Posts

Showing posts from May, 2023

IPL 2023 Season Summary || Moments of IPL 2023

  -  GT vs CSK  - Tushar Deshpande, the first-ever impact sub, proves too expensive. Williamson tears his ACL -  LSG vs DC  - Mark Wood fifer decimates Delhi -  RCB vs MI  - Back at Chinnaswamy, RCB smash MI. Kohli and Faf both got fifties -  CSK vs LSG  - CSK win a high scoring thriller by 12 runs. The difference - Dhoni's two sixes at the death -  KKR vs RCB  - Visitors outdone by spin. Suyash Sharma gets 3 on debut. Varun takes 4 and Shardul scores a match-winning 50 -  MI vs CSK  - Welcome back, Ajinkya Rahane. Scores his fastest IPL fifty -  GT vs KKR  - The Rinku game. Nothi ng more to say -  RCB vs LSG  - Pooran, Stoinis chase down 212. Avesh throws his helmet. Gambhir shushes the crowd. Harshal's failed mankad attempt -  DC vs MI  - MI win off the final ball, running 2 runs. Although Nortje nails 6 out of 6 Yorkers -  RR vs CSK  - Vintage Dhoni almost wins CSK an improbable g...

Chess game

Chess Game ♖ ♙ ♙ ♖

C++ Program to create a Chess game

#include <iostream> #include <string> using namespace std; enum Color { WHITE, BLACK }; enum Type { NONE, PAWN, KNIGHT, BISHOP, ROOK, QUEEN, KING }; struct Piece {     Type type;     Color color; }; class ChessGame { public:     ChessGame();     void playGame(); private:     Piece board[8][8];     Color currentPlayer;     bool isGameOver;     void initBoard();     void printBoard() const;     bool handleMove(string move);     bool isValidMove(int srcRow, int srcCol, int destRow, int destCol) const;     bool isKingInCheck(Color color) const;     bool isStalemate(Color color) const;     bool isCheckmate(Color color) const;     void movePiece(int srcRow, int srcCol, int destRow, int destCol); }; ChessGame::ChessGame() {     initBoard();     currentPlayer = WHITE;     isGameOver = false; } void ChessGa...

Chess code

#include #include using namespace std; enum Color { WHITE, BLACK }; enum Type { NONE, PAWN, KNIGHT, BISHOP, ROOK, QUEEN, KING }; struct Piece { Type type; Color color; }; class ChessGame { public: ChessGame(); void playGame(); private: Piece board[8][8]; Color currentPlayer; bool isGameOver; void initBoard(); void printBoard() const; bool handleMove(string move); bool isValidMove(int srcRow, int srcCol, int destRow, int destCol) const; bool isKingInCheck(Color color) const; bool isStalemate(Color color) const; bool isCheckmate(Color color) const; void movePiece(int srcRow, int srcCol, int destRow, int destCol); }; ChessGame::ChessGame() { initBoard(); currentPlayer = WHITE; isGameOver = false; } void ChessGame::playGame() { cout << "Welcome to chess!" << endl; while (!isGameOver) { printBoard(); if (isKingInCheck(currentPlayer)) { ...

Popular posts from this blog

Carbohydrates || Lipids|| Proteins || Vitamins & Minerals || Fats and Oils

Himanshu chaudhary

2.0 gram of a metal burst in oxygen give 3.2 gram of its oxide. 1.42 gram of the same metal heat in steam give 2.27 gram of its oxide which toys shown by this data?

Vistas Chapter-2 The Tiger King || Revision Notes Class 12 Board Exams

Data Mining || Supervised vs. Unsupervised Techniques || Dimensionality Reduction || Partitioning Methods