C# Class Word_Find_Solver.Grid

Mostrar archivo Open project: andreigec/Word-Find-Solver

Public Properties

Property Type Description
Baseform Form1

Public Methods

Method Description
Clear ( ) : void
FindAndHighlight ( FoundWord fw ) : void
FindAndHighlight ( String word, FindMode fm ) : void
GetLastTextbox ( ) : TextBox

get the very last textbox for panel resize

GetPointFromTextBox ( TextBox tb ) : GridPoint

get x,y of text box passed in.

InitGrid ( int widthI, int heightI, string rows = null ) : void

initialise the grid

InitGrid ( string rows ) : void
InitPanel ( ANDREICSLIB.ClassReplacements.PanelReplacement pu ) : void
InitWords ( ) : void
RandomiseLetters ( ) : void
SaveGridToFile ( String filename ) : void
SetGridPointValue ( TextBox tb, string sFirstOnly, bool setTextboxValue = true ) : void
Solve ( FindMode fm, bool onlyBest, int maxret = -1 ) : List

find all words and their scores in a grid and output the words found to a listbox

Private Methods

Method Description
FindMatch ( string word, int posc, FindMode fm, List lastaccum = null, Direction lastdir = Direction.NotSet ) : List

find words based on raw input text

GenNewLetter ( int max ) : char
GetDirection ( GridPoint basetb, GridPoint comptb ) : Direction
GetSquare ( char letter, FindMode fm, int startX = -1, int startY = -1, List ignorelist = null, Direction d = Direction.NotSet ) : IEnumerable

from a starting point, find a letter

GetWordScore ( IEnumerable history ) : int
OutOfBounds ( int a, bool isX ) : bool
SetSearchDimensions ( int startX, int startY, FindMode fm, int &miny, int &maxy, int &minx, int &maxx, Direction d = Direction.NotSet ) : void
SetTbColour ( TextBox tb, bool find ) : void
Solve ( String word, List history, Direction lastdir, FindMode fm, int minx, int maxx, int miny, int maxy ) : IEnumerable

from a starting letter/position, find all possible words from this

Method Details

Clear() public static method

public static Clear ( ) : void
return void

FindAndHighlight() public static method

public static FindAndHighlight ( FoundWord fw ) : void
fw FoundWord
return void

FindAndHighlight() public static method

public static FindAndHighlight ( String word, FindMode fm ) : void
word String
fm FindMode
return void

GetLastTextbox() public static method

get the very last textbox for panel resize
public static GetLastTextbox ( ) : TextBox
return System.Windows.Forms.TextBox

GetPointFromTextBox() public static method

get x,y of text box passed in.
public static GetPointFromTextBox ( TextBox tb ) : GridPoint
tb System.Windows.Forms.TextBox
return GridPoint

InitGrid() public static method

initialise the grid
public static InitGrid ( int widthI, int heightI, string rows = null ) : void
widthI int
heightI int
rows string
return void

InitGrid() public static method

public static InitGrid ( string rows ) : void
rows string
return void

InitPanel() public static method

public static InitPanel ( ANDREICSLIB.ClassReplacements.PanelReplacement pu ) : void
pu ANDREICSLIB.ClassReplacements.PanelReplacement
return void

InitWords() public static method

public static InitWords ( ) : void
return void

RandomiseLetters() public static method

public static RandomiseLetters ( ) : void
return void

SaveGridToFile() public static method

public static SaveGridToFile ( String filename ) : void
filename String
return void

SetGridPointValue() public static method

public static SetGridPointValue ( TextBox tb, string sFirstOnly, bool setTextboxValue = true ) : void
tb System.Windows.Forms.TextBox
sFirstOnly string
setTextboxValue bool
return void

Solve() public static method

find all words and their scores in a grid and output the words found to a listbox
public static Solve ( FindMode fm, bool onlyBest, int maxret = -1 ) : List
fm FindMode
onlyBest bool
maxret int
return List

Property Details

Baseform public_oe static_oe property

public static Form1 Baseform
return Form1