C# Class DeenGames.Valence.Model.CoreModel

Afficher le fichier Open project: deengames/valence

Méthodes publiques

Méthode Description
BoardToString ( ) : string
ClearEventHandlers ( ) : void
CreateBoard ( ) : void
GenerateBoard ( ) : void
IsLevelOver ( ) : bool
LoadBoard ( int puzzleLevel ) : void
MoveToNextLevel ( ) : void
PickNextAtom ( ) : void
SaveLevelReached ( ) : void
SetGameStateToNormal ( ) : void
SignalGameOver ( ) : void
SpewOutAtomsFromMachine ( ) : IList
StartAtFirstLevel ( ) : void
StartCountdownTimer ( ) : void
StopCountdownTimer ( ) : void
_countdownTickTimer_Tick ( object sender, EventArgs e ) : void

Private Methods

Méthode Description
CoreModel ( ) : System
GetPuzzleBoardAndToolboxDefinition ( int puzzleLevel ) : string
GetTilesInReaction ( Tile newAtomTile ) : IList
SetGameStateToGameComplete ( ) : void
calculateReactionsUsingBestFirstSearch ( IList potentialReactionTiles, Tile centerTile, IList foundSoFarInPath, IList foundSoFarInTotal ) : IList
calculateReactionsUsingBruteForceCombinations ( IList potentialReactionTiles, Tile userClickedTile ) : IList
clearBoard ( ) : void
countEmptyTilesOnTheBoard ( ) : int
generateNormalModeBoard ( ) : void
generatePuzzleModeLevel ( ) : void
getCombinationsOf ( int i, IList potentialReactionTiles, Tile userClickedTile ) : IList
getCombinationsOfTwo ( IList potentialReactionTiles, Tile userClickedTile ) : IList
getIncrementalCombinations ( IList potentialReactionTiles, IList previousSet ) : IList
getMostElectronegative ( IList molecules ) : Molecule
getNonEmptyAdjacentTiles ( Tile centerTile ) : IList
getPotentialReactionTiles ( Tile centerTile, IList toReturn ) : void

Get potential reaction tiles. These are non-empty tiles that are non-diagonally adjacent to centerTile. This also includes tiles that are adjacent to adjacent tiles.

loadLastReachedLevel ( ) : void
tileFollowsDifficultyBalancingAlgorithm ( Tile current, Atom proposedAtom ) : bool
weedOutNonConnectedMolecules ( IList molecules ) : IList

Given a list of potential molecules, weed out all the ones where the atoms are not all adjacent to each other. This can occur due to a bug-fix for I-shaped molecules not reacting, where we extended molecule detection to all non-empty adjacent tiles. As a result, you can have H-Be-Cl forming H-Cl, which is wrong. This function will fix that, by checking that H and Cl are adjacent.

Method Details

BoardToString() public méthode

public BoardToString ( ) : string
Résultat string

ClearEventHandlers() public méthode

public ClearEventHandlers ( ) : void
Résultat void

CreateBoard() public méthode

public CreateBoard ( ) : void
Résultat void

GenerateBoard() public méthode

public GenerateBoard ( ) : void
Résultat void

IsLevelOver() public méthode

public IsLevelOver ( ) : bool
Résultat bool

LoadBoard() public méthode

public LoadBoard ( int puzzleLevel ) : void
puzzleLevel int
Résultat void

MoveToNextLevel() public méthode

public MoveToNextLevel ( ) : void
Résultat void

PickNextAtom() public méthode

public PickNextAtom ( ) : void
Résultat void

SaveLevelReached() public méthode

public SaveLevelReached ( ) : void
Résultat void

SetGameStateToNormal() public méthode

public SetGameStateToNormal ( ) : void
Résultat void

SignalGameOver() public méthode

public SignalGameOver ( ) : void
Résultat void

SpewOutAtomsFromMachine() public méthode

public SpewOutAtomsFromMachine ( ) : IList
Résultat IList

StartAtFirstLevel() public méthode

public StartAtFirstLevel ( ) : void
Résultat void

StartCountdownTimer() public méthode

public StartCountdownTimer ( ) : void
Résultat void

StopCountdownTimer() public méthode

public StopCountdownTimer ( ) : void
Résultat void

_countdownTickTimer_Tick() public méthode

public _countdownTickTimer_Tick ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
Résultat void