- full name [en]: Hamid Reza Bluri Kashani
- full name [fa]: حمیدرضا بلوری کاشانی
BTC:
13gx8eaq52jUnD6QUVLHMtYq27G3PNYCfk
TON Coin:
UQDudFA4cPEO1faYGsSGtbls0OpXdA5RWNMhyKD9akDcl0cD
CHESS project _ uni shahed spring 1400
BTC:
13gx8eaq52jUnD6QUVLHMtYq27G3PNYCfk
TON Coin:
UQDudFA4cPEO1faYGsSGtbls0OpXdA5RWNMhyKD9akDcl0cD
we wanna basic implementation of chess board pieces.
first of all we have and 2d array that represents the board ( ChessPieces board[8][8]
) with following rules:
0
+
-
We number pieces like this: [ note: | x |
=> "absolute value of x" ]
enum ChessPieces {
Empty = 0,
WhitePawn = 1,
WhiteRook = 2,
WhiteKnight = 3,
WhiteBishop = 4,
WhiteQueen = 5,
WhiteKing = 6,
BlackPawn = -1,
BlackRook = -2,
BlackKnight = -3,
BlackBishop = -4,
BlackQueen = -5,
BlackKing = -6,
};
we have a class called BoardClass
:
class BoardClass {
public:
ChessPieces board[8][8];
vector<Point> possibleMoves( Point piecePosition );
ChessPieces move ( Point lastPiecePosition, Point newPiecePosition ) ;
};
we wanna add these functionalities:
possibleMoves
( piecePosition ) :
piecePosition
[ it's a Point
that contains x and y ] [ the Point class defined in System::Drawing
]vector<Point>
for possible movements of piece at piecePosition
move
( lastPiecePosition, newPiecePosition ) :
lastPiecePosition
to the new position newPiecePosition
ChessPieces.Empty
]we wanna implement a feature that user can choose between:
We wanna a JSON like database with these functionalities:
class Database{
public:
int
total_time,
reminded_time;
.....
void save_to_file( string path );
void load_from_string( string str ) ;
void load_from_file( string parh );
json dump_json();
} ;
we wanna some functionality to send email.
desired API:
void sendEmail ( string targetEmail, string message );
The very first thing about implementing undo
system is to save every single users action.
something like:
user1
moved the Pawn from (x1, y1)
to (x2, y2)
- as result the queen of user2
at (x2, y2)
kicked offUser2
moved King from p1
to p2
as result nothing happendUser1
moved pawn from ....And the when we wanna undo the actions, we simply reverse the user actions.
The basic implementation of undo system [ that I suggest ] is as follows:
class Movement {
public:
string
user1_name,
user2_name;
Point p1, p2; // Point is a class that contains a (x, y) - defind in System::Drawing
ChessPiece kicked_off_piece; // remeber the ChessPiece enum defined in chessClass module
} ;
class MovementTracker {
public:
vector <Movement> moves;
void add ( Movement m ) ;
Movement undo ();
} ;
Explanation:
MovementTracker
's job is to store the users moves.
add
method gives a new movement and add it to moves
undo
method in other hand, returns the last element of moves
;
details will be written later
intro pages are consists of:
the page that the user chooses to be client or server
client
, and one for choosing server
client login page
username
password
[optional] and a button to loginserver login page
username
password
[optional] and a button to startwait page to wait for other side
host
and port
and email
.features:
desired API:
class Timer {
public:
void setTime(int secs) ;
void start();
void stop();
void reset();
};
i'm actually wanna write a script to get a set of pieces pictures as PNG format, and then change the color of the that piece in the picture.
i prefer using Nim language for that but the TA doesn't know because he only see the result as PNG format 🤣
features:
Chess pieces
[مهره های شطرنج]features:
desired API:
class MusicPlayer{
public:
void selecrMusic( string music_file_path );
void play( );
void pause( );
void resetTime();
};
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.