Java poker implementation
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ControllerInfo.java 906B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * Copyright (c) Chris 'MD87' Smith, 2007. All rights reserved.
  3. *
  4. * This code may not be redistributed without prior permission from the
  5. * aforementioned copyright holder(s).
  6. */
  7. package com.md87.cardgame.config.controllers;
  8. import com.md87.cardgame.ui.GameWindow;
  9. import com.md87.cardgame.interfaces.Game;
  10. import com.md87.cardgame.interfaces.PlayerController;
  11. /**
  12. *
  13. * @author Chris
  14. */
  15. public abstract class ControllerInfo {
  16. public abstract String getName();
  17. public abstract PlayerController getController(final Game game, final GameWindow gameWindow);
  18. public String toString() {
  19. return getName();
  20. }
  21. public static ControllerInfo[] getControllers() {
  22. return new ControllerInfo[]{
  23. new HumanPlayerInfo(),
  24. new ConservativeOpenerInfo(),
  25. new EndGameInfo(),
  26. new RandomPlayerInfo()
  27. };
  28. }
  29. }