Kamisamakiss

Hello! My name is D.Y.A and I like to code, watch anime, and play video games. I made the Neo City so I can document my coding progress while learning CSS. Im currently learning C++ and once I feel confident enought I'll post my game here!

Python Ping Pong Game (07/21/25)

A two-player Ping Pong game coded in Python (Turtle)! Includes a Scoreboard Controls: W/S (Player 1) and (Player 2)

import turtle

# Setup window
win = turtle.Screen()
win.title("Pink Pong 🩷")
win.bgcolor("#ffe4ec")
win.setup(width=800, height=600)
win.tracer(0)

# Score
score_a = 0
score_b = 0

# Paddle A
paddle_a = turtle.Turtle()
paddle_a.speed(0)
paddle_a.shape("square")
paddle_a.color("#ff5c8d")
paddle_a.shapesize(stretch_wid=6, stretch_len=1)
paddle_a.penup()
paddle_a.goto(-350, 0)

# Paddle B
paddle_b = turtle.Turtle()
paddle_b.speed(0)
paddle_b.shape("square")
paddle_b.color("#ff5c8d")
paddle_b.shapesize(stretch_wid=6, stretch_len=1)
paddle_b.penup()
paddle_b.goto(350, 0)

# Ball
ball = turtle.Turtle()
ball.speed(0)
ball.shape("circle")
ball.color("#ff80ab")
ball.penup()
ball.goto(0, 0)
ball.dx = 3 #Chnages ball speed
ball.dy = -3

# Scoreboard
pen = turtle.Turtle()
pen.speed(0)
pen.color("#ff5c8d")
pen.penup()
pen.hideturtle()
pen.goto(0, 260)
pen.write("Player A: 0  Player B: 0", align="center", font=("Comfortaa", 20, "bold"))

# Paddle movement
def paddle_a_up(): paddle_a.sety(paddle_a.ycor() + 30)
def paddle_a_down(): paddle_a.sety(paddle_a.ycor() - 30)
def paddle_b_up(): paddle_b.sety(paddle_b.ycor() + 30)
def paddle_b_down(): paddle_b.sety(paddle_b.ycor() - 30)

# Keyboard bindings
win.listen()
win.onkeypress(paddle_a_up, "w")
win.onkeypress(paddle_a_down, "s")
win.onkeypress(paddle_b_up, "Up")
win.onkeypress(paddle_b_down, "Down")

# Main game loop
while True:
    win.update()

    # Move the ball
    ball.setx(ball.xcor() + ball.dx)
    ball.sety(ball.ycor() + ball.dy)

    # Border checking
    if ball.ycor() > 290:
        ball.sety(290)
        ball.dy *= -1
    if ball.ycor() < -290:
        ball.sety(-290)
        ball.dy *= -1

    # Right wall
    if ball.xcor() > 390:
        ball.goto(0, 0)
        ball.dx *= -1
        score_a += 1
        pen.clear()
        pen.write(f"Player A: {score_a}  Player B: {score_b}", align="center", font=("Comfortaa", 20, "bold"))

    # Left wall
    if ball.xcor() < -390:
        ball.goto(0, 0)
        ball.dx *= -1
        score_b += 1
        pen.clear()
        pen.write(f"Player A: {score_a}  Player B: {score_b}", align="center", font=("Comfortaa", 20, "bold"))

    # Paddle collisions
    if (340 < ball.xcor() < 350) and (paddle_b.ycor()-50 < ball.ycor() < paddle_b.ycor()+50):
        ball.setx(340)
        ball.dx *= -1
    if (-350 < ball.xcor() < -340) and (paddle_a.ycor()-50 < ball.ycor() < paddle_a.ycor()+50):
        ball.setx(-340)
        ball.dx *= -1
    

Java Guess The Number Game (09/09/2025)

Try to guess the secret number between 1 and 20! Coded in Java to practice loops and conditionals

import java.util.Scanner;
import java.util.Random;

public class GuessTheNumber {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        Random random = new Random();
        int secret = random.nextInt(20) + 1;
        int guess = 0, tries = 0;

        System.out.println(" Welcome to Guess the Number! ");

        while (guess != secret) {
            System.out.print("Enter a number between 1-20: ");
            guess = scanner.nextInt();
            tries++;

            if (guess < secret)
                System.out.println("Too low Try again!");
            else if (guess > secret)
                System.out.println("Too high  Try again!");
            else
                System.out.println(" You guessed it in " + tries + " tries!");
        }
        scanner.close();
    }
}