示例#1
0
        public void updateGameForPlayer(Graphics g, Player player)
        {
            var tableDraw = new TableDraw(player.tableCoordinates);

            tableDraw.DrawTable(g, player.getField());
            tableDraw.DrawDestroyedShips(g, player.GetDestroyedShips());
            tableDraw.DrawInfo(g, player.name, player.scores);
        }
示例#2
0
        public void updatePrepare(Graphics g, Player player)
        {
            var tableDraw    = new TableDraw(player.tableCoordinates, prepareMode: true);
            var elementsDraw = new ElementsDraw(player.listCoordinates);

            var field = player.getField();

            tableDraw.DrawTable(g, field);
            tableDraw.DrawShips(g, player.GetAllShips());
            tableDraw.DrawShip(g, player.GetActiveShip(), true);
            tableDraw.DrawInfo(g, player.name, player.scores);

            elementsDraw.updateListOfShips(g, player.leftShips);
            elementsDraw.updateActiveShipInList(g, player.GetActiveShip(), player.GetActiveShipPosition());
        }