Skip to content

Instantly share code, notes, and snippets.

@liarokapisv
Last active February 19, 2019 11:25
Show Gist options
  • Save liarokapisv/3ee16950005ce2452819623ef36758b4 to your computer and use it in GitHub Desktop.
Save liarokapisv/3ee16950005ce2452819623ef36758b4 to your computer and use it in GitHub Desktop.
import game.PlayerModel;
import game.PlayerView;
import game.Player;
import game.GameState;
import java.util.Map;
public class PlayerController
{
public class PlayerController(Map<Player, PlayerModel> modelMap, Map<Player, PlayerView> viewMap)
{
this.modelMap = modelMap;
this.viewMap = viewMap;
}
public void move_player(Player player, Integer location)
{
this.modelMap.get(player).move(location);
this.viewMap.get(player).move(location);
}
private Map<Player, PlayerModel> modelMap;
private Map<Player, PlayerView> viewMap;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment