Class HumanPlayer

java.lang.Object
  |
  +--Player
        |
        +--HumanPlayer

public class HumanPlayer
extends Player

This class models all aspects of HumanPlayer


Field Summary
 int victoryPts
           
 
Fields inherited from class Player
forcePoints, planets, playerUnits, victoryPoints
 
Constructor Summary
HumanPlayer()
           
 
Method Summary
 int calcPoints(int x)
          Victory Points earned only by HumanPlayer and used only when Instant Victory is not possible This is a function where any team can call and keeps its value in memory x is the point positive or negative added to victoryPts
 void HumanPlayer(Group HumanPlayerUnits, int forcePts, Planet[] Iplanets)
          Initial shot at constructor for HumanPlayer; requires: 1) reference to the units owned by HumanPlayer 2) number of force points accounted to HumanPlayer can be 0 if not applicable 3) reference to the planets ONLY that the HumanPlayer controls 4) victory points earned only by HumanPlayer
 void mission()
          HumanPlayer version of operations; different to AI that Bob will actually have to choose Rebel turn: operations; mission phase: Calls class: Mission
 void movement()
          HumanPlayer version of movement; different to AI that Bob will actually have to choose Rebel turn: operation; movement: 1) HumanPlayer picks which characters and/or military units to move 2) HumanPlayer picks which planet to move to if applicable 3) HumanPlayer picks which environ to move to 4) HumanPlayer may choose no to move
 void react()
          HumanPlayer version of reaction; different to AI that Bob will actually have to choose AI turn: operations; enemy reaction segment: 1) HumanPlayer checks the environs where there are Imperial military units or a detected Imperial character 2) HumanPlayer may choose which military unit to move 3) HumanPlayer may choose which military unit and a leader to move 4) or HumanPlayer may choose which character to move 5) HumanPlayer may choose no to move 6) HumanPlayer chooses to move to an environ occupied by an Imperial military unit or a detected Imperial character
 void search()
          HumanPlayer version of operations; different to AI that Bob will actually have to choose AI turn: operation; search phase: 1) Humanplayer checks where detected Imperial characters are in same location as Rebel units 2) HumanPlayer decides wether to initiate combat on environs where where Imperial units are detected
 void tryCombat()
          HumanPlayer version of operations; different to AI that Bob will actually have to choose AI turn:operations; combat segment: Rebel turn: operations; combat segment: 1) HumanPlayer checks if combat is possible, if not returns 2) HumanPlayer checks and see which environs combat is possible 3) HumanPlayer takes away units where Rebel forces are outnumbered 4) HumanPlayer assignes leaders where available 5) HumanPlayer chooses to do combat where it is possible
 
Methods inherited from class Player
getForcePoints, getPlayerType, isPlayerAI, isPlayerHuman, move, Player, setForcePoints, setPlayerType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

victoryPts

public int victoryPts
Constructor Detail

HumanPlayer

public HumanPlayer()
Method Detail

HumanPlayer

public void HumanPlayer(Group HumanPlayerUnits,
                        int forcePts,
                        Planet[] Iplanets)
Initial shot at constructor for HumanPlayer; requires: 1) reference to the units owned by HumanPlayer 2) number of force points accounted to HumanPlayer can be 0 if not applicable 3) reference to the planets ONLY that the HumanPlayer controls 4) victory points earned only by HumanPlayer


calcPoints

public int calcPoints(int x)
Victory Points earned only by HumanPlayer and used only when Instant Victory is not possible This is a function where any team can call and keeps its value in memory x is the point positive or negative added to victoryPts


movement

public void movement()
HumanPlayer version of movement; different to AI that Bob will actually have to choose Rebel turn: operation; movement: 1) HumanPlayer picks which characters and/or military units to move 2) HumanPlayer picks which planet to move to if applicable 3) HumanPlayer picks which environ to move to 4) HumanPlayer may choose no to move


react

public void react()
HumanPlayer version of reaction; different to AI that Bob will actually have to choose AI turn: operations; enemy reaction segment: 1) HumanPlayer checks the environs where there are Imperial military units or a detected Imperial character 2) HumanPlayer may choose which military unit to move 3) HumanPlayer may choose which military unit and a leader to move 4) or HumanPlayer may choose which character to move 5) HumanPlayer may choose no to move 6) HumanPlayer chooses to move to an environ occupied by an Imperial military unit or a detected Imperial character

Overrides:
react in class Player

tryCombat

public void tryCombat()
HumanPlayer version of operations; different to AI that Bob will actually have to choose AI turn:operations; combat segment: Rebel turn: operations; combat segment: 1) HumanPlayer checks if combat is possible, if not returns 2) HumanPlayer checks and see which environs combat is possible 3) HumanPlayer takes away units where Rebel forces are outnumbered 4) HumanPlayer assignes leaders where available 5) HumanPlayer chooses to do combat where it is possible


search

public void search()
HumanPlayer version of operations; different to AI that Bob will actually have to choose AI turn: operation; search phase: 1) Humanplayer checks where detected Imperial characters are in same location as Rebel units 2) HumanPlayer decides wether to initiate combat on environs where where Imperial units are detected

Overrides:
search in class Player

mission

public void mission()
HumanPlayer version of operations; different to AI that Bob will actually have to choose Rebel turn: operations; mission phase: Calls class: Mission