public FleedForPlayer(Player player) { this.player = player; fleed = new Fleed(); PlayerOnGrid = new PlayerOnGrid(); }
public Tile Get_Ball_Nearest_Player(PlayerOnGrid player) { for (int i = rows - 1; i >= 0; i--) { Tile aux = tiles[i][player.current_column]; if (aux.hasBall) { return(aux); } } Debug.Log("No balls."); return(null); }
public Tile Get_Player_New_Tile(PlayerOnGrid player, Command cmd) { Tile aux = Get_Last_Row()[player.current_column]; switch (cmd) { case Command.MOVE_LEFT: if (player.current_column > 0) { aux = Get_Last_Row()[player.current_column - 1]; } break; case Command.MOVE_RIGHT: if (player.current_column < Get_Last_Row().Count - 1) { aux = Get_Last_Row()[player.current_column + 1]; } break; } return(aux); }
bool Is_Local_Grid() { return(grid_ID == PlayerOnGrid.Get_Local_Player_ID()); }