private void ButtonClicked(object sender, RoutedEventArgs e) { Button b = (Button)sender; Component.Board.GameState c = (Component.Board.GameState)Entity.BoardEntity.Instance.components["GameState"]; c.currentGameState.Execute(Int32.Parse(b.Tag.ToString())); }
public MainWindow() { InitializeComponent(); PopulateButtonDict(); PopulateGroupBoxDict(); PopulateListboxesDict(); Component.Board.GameState c = (Component.Board.GameState)Entity.BoardEntity.Instance.components["GameState"]; c.currentGameState.Enter(); }