i.e. when one player's turn ends, it's the next player's turn to play, on the same computer.
This will only work for turn-based games I think
=-=-=-=
Make players play in a fixed order and generalize the code to work with multiple human players
[x] Move the code for turn handling to the GameTurn class
[x] The GameTurn class now has a private property that tells which player's turn it is
[x] When a human player ends their turn (which calls the function), the method increments the playing player index and plays out the turn of that player
[x] If it's a human player's turn, exit the function
[x] If it's an AI player's turn, play the AI's turn
[x] If all players played their turn, the index resets to 0 and a new turn begins
Make local multiplayer work
[x] When it's a new person's turn, change the _you property in Game
[x] When it's a new person's turn, update the UI and move the camera to the player's country
[x] Save and load all the human players
[x] Save and load whose turn it is to play
Make it clear when it's your turn
[x] Player has a default username and a custom username
[x] The playing country's name is given to all players as default username when loading a game
[x] Custom username is given to human players when loading a game ("Player 1", "Player 2" and so on)
[x] Create an animation that tells it's THIS PERSON's turn on screen, using their username
[x] When it's a new person's turn, play the animation
[x] Only play this animation where there is more than 1 human player
Add an interface with player info
[x] In the top right of the screen, have a small interface with text that shows all the human players (by username)
[x] In that interface, show whose turn it is with an arrow
[x] Only display that interface when there is more than 1 human player
[x] The interface should have a maximum size that it won't exceed
[x] Make the list a scroll container, for when there are too many players to show all of them
Differentiate humans from AI
[x] Give the username of AI players a different color from those of humans
Add a player list in the lobby
[x] Rewrite the player list so that it takes a Players object instead of a Game, and so that the GameTurn is optional
[x] In the lobby, have the same player list interface initialized with one player
Add a button that adds a player (lobby)
[x] At the bottom of the player list, have a large rectangular button that says "Add player"
[x] When pressed in the lobby, a new human player is created
[x] This button does not appear in-game
[x] If the maximum number of players is reached, hide the button
Create circular buttons
[x] Create a simple vector image of a circular button
[x] Find out if TextureButtons suits our needs (edit: yes it does)
Add circular buttons to the right of usernames on the player list
[x] Make it possible to add many circular buttons to the right of usernames, without overlap
[x] The buttons only appear when you hover over the player's username
[x] Some buttons only appear next to human players, or only next to AI players
Add a button that adds a player (in-game)
[x] Add a circular button with a green "+" icon to the right of usernames on the player list
[x] The button only appears next to AI players
[x] When pressed, the AI player becomes a human player; the visuals are updated to reflect this
[x] To better differentiate between humans and AI, the suffix "(AI)" appears next to AI player names only
Add a button that removes a player
[x] Add a circular button with a red "-" icon to the right of usernames on the player list
[x] The button only appears next to human players
[x] The button only appears when there is more than 1 human player
[x] When pressed in the lobby, the player is removed from the list
[x] When pressed in-game, the human player is changed to an AI player; visuals are updated accordingly
[x] When pressed in-game, if it was that player's turn to play, their turn is skipped and the game continues
[x] The "Add player" button reappears when the number of human players is no longer the maximum
Add a button that changes a player's username
[x] Add a circular button with a pencil icon to the right of usernames
[x] This button is present in both the lobby and in-game, both on human and AI players
[x] Pressing the button turns the username label into a TextEdit
[x] Add a circular button with a green checkmark icon
[x] The green checkmark button only appears while renaming a player
[x] While renaming, the green checkmark button is shown at all times, even when not hovering
[x] While renaming, no other circular button is visible for that player
[x] If you click anywhere outside the player's box, the renaming ends
[x] Clicking on the green checkmark or pressing Enter submits the username
[x] The player's username is changed to the new username
Start games with the players that were set up in the lobby
[x] When a new game is started, the scenario receives the player data
[x] The scenario uses the player data to build the JSON file
Still have the same player list when going back to main menu
[x] When going back to main menu, the player list persists, with the AI players discarded
i.e. when one player's turn ends, it's the next player's turn to play, on the same computer. This will only work for turn-based games I think =-=-=-=
Make players play in a fixed order and generalize the code to work with multiple human players
Make local multiplayer work
Make it clear when it's your turn
Add an interface with player info
Differentiate humans from AI
Add a player list in the lobby
Add a button that adds a player (lobby)
Create circular buttons
Add circular buttons to the right of usernames on the player list
Add a button that adds a player (in-game)
Add a button that removes a player
Add a button that changes a player's username
Start games with the players that were set up in the lobby
Still have the same player list when going back to main menu