Re: a project for beginner
I am particularly fond of puzzle games. I recommend you either do a text based GUI game, like Connect Four (http://en.wikipedia.org/wiki/Connect_Four), or Fifteen puzzle (http://en.wikipedia.org/wiki/15_puzzle).
If you feel bolder, you can try to do automatic puzzle solvers, like sodoku solver, or nonogram(http://en.wikipedia.org/wiki/Nonogram)
If you really feel bold, you can try to do a 15 puzzle solver, or a Connect four bot.
I can GUARANTEE you will learn a lot from this experience. Personally, I would try to do them in this order, from easy to hard:
Easy
- Connect Four Game
- 15 Puzzle Game
OK
- Sudoku Solver
Hard
- Nonogram Solver
Harder
- 15 Puzzle Solver
Hardest
- Connect 4 Bot
I have been writing a new sudoku solver every year for the past 6 years, and have been learning something every year form it.
Re: a project for beginner
Quote:
Originally Posted by
monarch_dodra
I am particularly fond of puzzle games. I recommend you either do a text based GUI game, like Connect Four (
http://en.wikipedia.org/wiki/Connect_Four), or Fifteen puzzle (
http://en.wikipedia.org/wiki/15_puzzle).
If you feel bolder, you can try to do automatic puzzle solvers, like sodoku solver, or nonogram(
http://en.wikipedia.org/wiki/Nonogram)
If you really feel bold, you can try to do a 15 puzzle solver, or a Connect four bot.
I can
GUARANTEE you will learn a lot from this experience. Personally, I would try to do them in this order, from easy to hard:
Easy
- Connect Four Game
- 15 Puzzle Game
OK
- Sudoku Solver
Hard
- Nonogram Solver
Harder
- 15 Puzzle Solver
Hardest
- Connect 4 Bot
I have been writing a new sudoku solver every year for the past 6 years, and have been learning something every year form it.
Thank you very much, i will do what i can to try each one of these and post any questions i have on here and the ending results. I do have one question first,
What areas of C++ would i need to learn in order to complete connect 4.
Re: a project for beginner
Quote:
Originally Posted by
Alexz003
Thank you very much, i will do what i can to try each one of these and post any questions i have on here and the ending results. I do have one question first,
What areas of C++ would i need to learn in order to complete connect 4.
Depends on how you want to implement it. I'd say you don't need anything but logic, and basic knowledge of the syntax, and the cout, endl functions. It will have you work with loops and ifs. If you want to get a bit fancier (which I recommend), you should create a class that represents the board, with a basic interface, so you can write things like.
Code:
connect4Board myBoard;
myBoard.insertPiece(4,red);
This would allow you to insert a red piece, in the 4'th row. In this case red is from an enum color.
Re: a project for beginner
See the only problem is i wouldn't know how to put it together because even though i have played connect 4 i still don't know how i can set limitations on the board size and where the pieces of the computer go.
Re: a project for beginner
Quote:
Originally Posted by
Alexz003
. still don't know how i can set limitations on the board size and where the pieces of the computer go.
The computer pieces stay on the desk.:D
I wouldn't worry about AI for a computer opponent yet. Just get the game working in two player mode (i.e. two human players) first.
With regards to the board. That stays the same size, so you could create yourself a 2D array object that holds board pieces.
Re: a project for beginner
Quote:
Originally Posted by
Alexz003
See the only problem is i wouldn't know how to put it together because even though i have played connect 4 i still don't know how i can set limitations on the board size and where the pieces of the computer go.
Use simple English to describe your problem, and things will fall into place:
-You want to simulate a Connect4 game/object: Create a Connect4 class
-A connect4 game is a grid of pieces: 2D Array
-Pieces in the board can be either empty, black or red: Enum
-You need to put pieces into the board: create a insertPiece Method.
Once this is done, all you use your board: Have two players take turn putting pieces into the board. Display the board after every play, and keep going.
My advice is to keep it simple, create something that works, and then make it progressively better. Take it one step at a time, and you should make it.