C# 클래스 MBC.Shared.Entities.Player

상속: System.Entity
파일 보기 프로젝트 열기: aiclub/Mohawk_Battleship 1 사용 예제들

공개 메소드들

메소드 설명
BeginTurn ( ) : void

Begins the player's turn.

Disqualify ( String reason ) : void

Disqualifies the player

EndTurn ( ) : void

Switches the turn from this player to another.

Lose ( ) : void

Makes the player lose

Message ( String message ) : void

Makes the player send a message.

Player ( System.Entity parent, string newName ) : System

Constructs a Player with an ID and a name. This player will not have a controller.

Shoot ( int x, int y ) : Shot

Shoots against an arbitrary player opponent at the specified X and Y coordinates.

Shoot ( Player opponent, int x, int y ) : void

Shoots against a player opponent at the specified X and Y coordinates.

Shoot ( Shot shot ) : void

Shoots a shot for the player.

ToString ( ) : string

Generates a string representation of the player.

Win ( ) : void

Makes the player win.

메소드 상세

BeginTurn() 공개 메소드

Begins the player's turn.
public BeginTurn ( ) : void
리턴 void

Disqualify() 공개 메소드

Disqualifies the player
public Disqualify ( String reason ) : void
reason String
리턴 void

EndTurn() 공개 메소드

Switches the turn from this player to another.
Thrown when the event being created is not valid for the /// current state of the player.
public EndTurn ( ) : void
리턴 void

Lose() 공개 메소드

Makes the player lose
Thrown when the event being created is not valid for the /// current state of the player.
public Lose ( ) : void
리턴 void

Message() 공개 메소드

Makes the player send a message.
public Message ( String message ) : void
message String
리턴 void

Player() 공개 메소드

Constructs a Player with an ID and a name. This player will not have a controller.
public Player ( System.Entity parent, string newName ) : System
parent System.Entity
newName string The name of the player
리턴 System

Shoot() 공개 메소드

Shoots against an arbitrary player opponent at the specified X and Y coordinates.
public Shoot ( int x, int y ) : Shot
x int
y int
리턴 Shot

Shoot() 공개 메소드

Shoots against a player opponent at the specified X and Y coordinates.
public Shoot ( Player opponent, int x, int y ) : void
opponent Player
x int
y int
리턴 void

Shoot() 공개 메소드

Shoots a shot for the player.
public Shoot ( Shot shot ) : void
shot Shot
리턴 void

ToString() 공개 메소드

Generates a string representation of the player.
public ToString ( ) : string
리턴 string

Win() 공개 메소드

Makes the player win.
Thrown when the event being created is not valid for the /// current state of the player.
public Win ( ) : void
리턴 void