public void LoadSessions(Session leftSession, Session rightSession) { _leftSession = leftSession; _rightSession = rightSession; _matches = new List<TileMatch>(); var leftHash = _leftSession.GenerateHash(); var rightHash = rightSession.GenerateHash(); Session.Tile leftTile; Session.Tile rightTile; foreach (var tileHash in leftHash.Keys) { leftTile = leftHash[tileHash]; rightHash.TryGetValue(tileHash, out rightTile); if (rightTile != null) { var match = new TileMatch() { LeftPoint = new Point(leftTile.X, leftTile.Y), RightPoint = new Point(rightTile.X, rightTile.Y) }; _matches.Add(match); } } _currentMatchIndex = 0; rightSessionPictureBox.UpdateSession(_rightSession); leftSessionPictureBox.UpdateSession(_leftSession); UpdateMatch(); }
public void LoadSessions(Session leftSession, Session rightSession) { _leftSession = leftSession; _rightSession = rightSession; _matches = new List <TileMatch>(); var leftHash = _leftSession.GenerateHash(); var rightHash = rightSession.GenerateHash(); Session.Tile leftTile; Session.Tile rightTile; foreach (var tileHash in leftHash.Keys) { leftTile = leftHash[tileHash]; rightHash.TryGetValue(tileHash, out rightTile); if (rightTile != null) { var match = new TileMatch() { LeftPoint = new Point(leftTile.X, leftTile.Y), RightPoint = new Point(rightTile.X, rightTile.Y) }; _matches.Add(match); } } _currentMatchIndex = 0; rightSessionPictureBox.UpdateSession(_rightSession); leftSessionPictureBox.UpdateSession(_leftSession); UpdateMatch(); }
public ScoreUpdateArgs(int scoreDifference, int comboCount, int currentScore, TileMatch tileMatch) { ScoreDifference = scoreDifference; ComboCount = comboCount; CurrentScore = currentScore; TileMatch = tileMatch; }
// END CUT HERE // BEGIN CUT HERE public static void Main() { try { TileMatch ___test = new TileMatch(); ___test.run_test(-1); } catch (Exception e) { //Console.WriteLine(e.StackTrace); Console.WriteLine(e.ToString()); } }
// END CUT HERE // BEGIN CUT HERE public static void Main() { try { TileMatch ___test = new TileMatch(); ___test.run_test(-1); } catch(Exception e) { //Console.WriteLine(e.StackTrace); Console.WriteLine(e.ToString()); } }
public static List <TileMatch> PlaceMap(IEnumerable <TileMatch> tileMatches) { var tileMatch = tileMatches.ToDictionary(match => match.Tile.Id); return(TileMatch.Handle(tileMatch).Select(x => x.Value).ToList()); }
public TileMatchArgs(TileMatch tileMatch, int combo) { TileMatch = tileMatch; Combo = combo; }