C# Class Com.CodeGame.CodeWizards2016.DevKit.CSharpCgdk.VisualClient

Show file Open project: JustAMan/russian-ai-cup-visual Class Usage Examples

Public Methods

Method Description
Arc ( double x, double y, double radius, double startAngle, double arcAngle, float r = 0f, float g = 0f, float b = 0f ) : void
BeginPost ( ) : void

Start queueing commands to be displayed either after main drawing

BeginPre ( ) : void

Start queueing commands to be displayed either before main drawing

Circle ( double x, double y, float radius, float r = 0f, float g = 0f, float b = 0f ) : void

Draw a circle at (x, y) with radius r and color color

Close ( ) : void
EndPost ( ) : void

Mark either "post" queue of commands as ready to be displayed

EndPre ( ) : void

Mark either "pre" queue of commands as ready to be displayed

FillArc ( double x, double y, double radius, double startAngle, double arcAngle, float r = 0f, float g = 0f, float b = 0f ) : void

draw a filled arc with center at (x, y), radius radius and angle arcAngle, started from startAngle with color color, angles in radians

FillCircle ( double x, double y, float radius, float r = 0f, float g = 0f, float b = 0f ) : void

Draw a filled circle at (x, y) with radius r and color color

FillRect ( double x1, double y1, double x2, double y2, float r = 0f, float g = 0f, float b = 0f ) : void

Draw a filled rect with corners at (x1, y1) to (x2, y2) with color color

Line ( double x1, double y1, double x2, double y2, float r = 0f, float g = 0f, float b = 0f ) : void

Draw a line from (x1, y1) to (x2, y2) with color color

Rect ( double x1, double y1, double x2, double y2, float r = 0f, float g = 0f, float b = 0f ) : void

Draw a rect with corners at (x, y) to (x, y) with color color

Text ( double x, double y, string msg, float r = 0f, float g = 0f, float b = 0f ) : void

Show msg at coordinates (x, y) with color color

VisualClient ( string host, int port ) : System
beginAbs ( ) : void

start queueing commands to be displayed on the absolute coordinates

endAbs ( ) : void

Private Methods

Method Description
SendCommand ( string command ) : void
ValidateColor ( float r, float g, float b ) : void
WriteInt ( int value ) : void
WriteString ( string value ) : void

Method Details

Arc() public method

public Arc ( double x, double y, double radius, double startAngle, double arcAngle, float r = 0f, float g = 0f, float b = 0f ) : void
x double
y double
radius double
startAngle double
arcAngle double
r float
g float
b float
return void

BeginPost() public method

Start queueing commands to be displayed either after main drawing
public BeginPost ( ) : void
return void

BeginPre() public method

Start queueing commands to be displayed either before main drawing
public BeginPre ( ) : void
return void

Circle() public method

Draw a circle at (x, y) with radius r and color color
public Circle ( double x, double y, float radius, float r = 0f, float g = 0f, float b = 0f ) : void
x double
y double
radius float
r float
g float
b float
return void

Close() public method

public Close ( ) : void
return void

EndPost() public method

Mark either "post" queue of commands as ready to be displayed
public EndPost ( ) : void
return void

EndPre() public method

Mark either "pre" queue of commands as ready to be displayed
public EndPre ( ) : void
return void

FillArc() public method

draw a filled arc with center at (x, y), radius radius and angle arcAngle, started from startAngle with color color, angles in radians
public FillArc ( double x, double y, double radius, double startAngle, double arcAngle, float r = 0f, float g = 0f, float b = 0f ) : void
x double
y double
radius double
startAngle double
arcAngle double
r float
g float
b float
return void

FillCircle() public method

Draw a filled circle at (x, y) with radius r and color color
public FillCircle ( double x, double y, float radius, float r = 0f, float g = 0f, float b = 0f ) : void
x double
y double
radius float
r float
g float
b float
return void

FillRect() public method

Draw a filled rect with corners at (x1, y1) to (x2, y2) with color color
public FillRect ( double x1, double y1, double x2, double y2, float r = 0f, float g = 0f, float b = 0f ) : void
x1 double
y1 double
x2 double
y2 double
r float
g float
b float
return void

Line() public method

Draw a line from (x1, y1) to (x2, y2) with color color
public Line ( double x1, double y1, double x2, double y2, float r = 0f, float g = 0f, float b = 0f ) : void
x1 double
y1 double
x2 double
y2 double
r float
g float
b float
return void

Rect() public method

Draw a rect with corners at (x, y) to (x, y) with color color
public Rect ( double x1, double y1, double x2, double y2, float r = 0f, float g = 0f, float b = 0f ) : void
x1 double
y1 double
x2 double
y2 double
r float
g float
b float
return void

Text() public method

Show msg at coordinates (x, y) with color color
public Text ( double x, double y, string msg, float r = 0f, float g = 0f, float b = 0f ) : void
x double
y double
msg string
r float
g float
b float
return void

VisualClient() public method

public VisualClient ( string host, int port ) : System
host string
port int
return System

beginAbs() public method

start queueing commands to be displayed on the absolute coordinates
public beginAbs ( ) : void
return void

endAbs() public method

public endAbs ( ) : void
return void