Chess Board Coding Exercise

Part 1: Setup Git

1. Check if Git is installed:
git --version
If you see a version number, Git is installed. If not, download from git-scm.com
2. Set your credentials:
git config --global user.name "g11s1"
git config --global user.email "g11s1@ict.ru"
3. Create and navigate to your folder:
cd Documents
mkdir chess-project
cd chess-project

Part 2: Get the Code

1. Go to Gitea in your browser:
https://gitea.techshare.cc
2. Login with your credentials
3. Fork this repository:
https://gitea.techshare.cc/technolyceum/g11-m2.git
Click the "Fork" button to create your own copy
4. Clone your forked repository:
git clone https://gitea.techshare.cc/your-username/g11-m2.git
Replace "your-username" with your actual Gitea username
5. Enter the project folder:
cd g11-m2

Part 3: Coding Tasks

Task 1: CSS Styling

Find the .chess-board CSS and add:

width: 400px; height: 400px; display: grid; border: 3px solid gray;
Task 2: JavaScript Function

Find the function and replace with:

function createChessBoard() {
Task 3: For Loops

Find the loops and replace with:

for (let row = 0; row < 8; row++) { for (let col = 0; col < 8; col++) {
Test your work:
  1. Save the HTML file
  2. Open it in a browser
  3. Click "Create Chess Board"
  4. You should see a chess board with 64 squares!

Part 4: Save to Git

1. Check what you changed:
git status
2. Add your changes:
git add .
3. Commit with a message:
git commit -m "Completed chess board coding exercise"
4. Push to your repository:
git push origin main
If asked for credentials:
5. Verify on Gitea:

Refresh your repository page in the browser to see your changes

What you learned: