/// <summary> /// initialize the the board /// put chess on board /// </summary> /// <param name="g"></param> public void init(Graphics g) { qipan = new chessboard(); drawing = new drawing(g, qipan); switch (gamemode) { case mode.free_local: playerA = new player(this); playerA.seat = player.set.top; playerA.playersource = player.source.local; playerA.color = player.colour.black; playerA.ini(); playerB = new player(this); playerB.seat = player.set.bottom; playerB.playersource = player.source.local; playerB.color = player.colour.red; playerB.ini(); break; case mode.turn_local: playerA = new player(this); playerA.seat = player.set.top; playerA.playersource = player.source.local; playerA.color = player.colour.black; playerA.ini(); playerB = new player(this); playerB.seat = player.set.bottom; playerB.playersource = player.source.local; playerB.color = player.colour.red; playerB.ini(); playerB.turn = true; this.turn = turnm.playerB; break; case mode.networking: break; case mode.AI: break; } }