+ 2
Create game Chess in console app C#
hi everyone, i have my exercise of OOP C# but this difficule for me, that's create a game chess in console app c#, with 2 player... some one help me pls :(((, that should create so much class and i dont know how to do thank a lot and have a great day !
7 Respostas
+ 1
if it is your exercise in OOP you should realy do it yourself. By doing it alone and not coping it you may need much more time but you learn alot!
You can ask specific questions for your problems but not a whole exercise.
+ 1
i woud start by making an abstract piece class and then make every different piece (king, queen, ect ) inheritate from it.
The piece class should have a char for representation x y for position on board and maybe legal moves and owner ect.
the board should also have a "draw" or "print" method printing the current pieces ect.
+ 1
i dont know if you want to train your oop skills or just have to finish the project ... but so far it looks ok. there is a ';' inside the array next to the 1s ... should be a ,
+ 1
i'm done. ^^, but if Java has Vector, which C# has ? ArrayList ? i had done my Class game, i'll do for class pawn,knight too
+ 1
i need full code please
0
yeah, i have like this, but i dont,t know how to begin
class Game
{
public Player p1, p2;
public Piece[,] Gameboard;
public int Nbturn;
public Game()
{
//TODO begin game table of game
//TODO create player
}
0
i have this :
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Chesss
{
class Game
{
static int[][] Board ={ { 4, 2, 3, 6, 5, 3, 2, 4 },
{1,1,1,1,1,1,1,1 };
{0,0,0,0,0,0,0,0 },
{0,0,0,0,0,0,0,0 },
{0,0,0,0,0,0,0,0 },
{0,0,0,0,0,0,0,0 },
{-1,-1,-1,-1,-1,-1,-1,-1},
{-4,-2,-3,-6,-5,-3,-2,-4}};
}
}
but it have error, are you think my methode simple ???