Hi....
i'm creating a checker game in c# i have a board class, a checker class, a player class... i have create a List<Checker> BlackList and List <Checker> WhiteList in Board Class but i don't know how to place checkers in board and howto associate the WhiteList to Player 1 and the BlackList to Player 2...
I'm new in c#. i have stuty c and c++ but no with list... :(
can someone help me to understand how to do this?:crying:
thanks :rolleyes:
2 replies to this topic
#1
Posted 18 February 2012 - 12:41 AM
|
|
|
#2
Posted 18 February 2012 - 06:45 AM
A list is basically a strongly typed Array list, with extra functionality.
In your checker class, you should have board position, or an X position and Y position if you want to break it up. You should have a checker mover class that validates moves, removes jumped pieces, sees if the game is over, etc. The board should have a ResetBoard method that moves the checkers back to their original position.
In your checker class, you should have board position, or an X position and Y position if you want to break it up. You should have a checker mover class that validates moves, removes jumped pieces, sees if the game is over, etc. The board should have a ResetBoard method that moves the checkers back to their original position.
#3
Posted 18 February 2012 - 10:15 AM
hi! firstly thanks for your time :rolleyes:
in my checker class i have an array of int that keep the checker position in board... the board validate the move but i don't know how to use the checker list to associate the blackChecker to player 1 and whiteChecker to player 2... where do i have to create the list .... in board class or create another class???
thanks :)
in my checker class i have an array of int that keep the checker position in board... the board validate the move but i don't know how to use the checker list to associate the blackChecker to player 1 and whiteChecker to player 2... where do i have to create the list .... in board class or create another class???
thanks :)
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account

Back to top









