tic_tac_toe

psychedelic techno, dubstep, boom bap p-funk, groovy instrumental introduction

May 24th, 2024suno

歌詞

[Instrumental Introduction def print_board(board): """Prints the current state of the board.""" for row in board: print(" | ".join(row)) print("-" * 5) def check_winner(board, player): """Checks if the given player has won.""" # Check rows, columns, and diagonals for i in range(3): if all([spot == player for spot in board[i]]) or all([board[j][i] == player for j in range(3)]): return True if board[0][0] == board[1][1] == board[2][2] == player or board[0][2] == board[1][1] == board[2][0] == player: return True return False [Instrumental] def check_draw(board): """Checks if the game is a draw.""" return all([spot in ["X", "O"] for row in board for spot in row]) def tic_tac_toe(): board = [[" " for _ in range(3)] for _ in range(3)] current_player = "X" while True: print_board(board) row = int(input(f"Player {current_player}, enter the row (0, 1, 2): ")) col = int(input(f"Player {current_player}, enter the column (0, 1, 2): ")) [Instrumental] if board[row][col] == " ": board[row][col] = current_player else: print("That spot is already taken. Try again.") continue if check_winner(board, current_player): print_board(board) print(f"Player {current_player} wins!") break if check_draw(board): print_board(board) print("The game is a draw!") break [Instrumental] current_player = "O" if current_player == "X" else "X" if __name__ == "__main__": tic_tac_toe() [Instrumental] [End]

おすすめ

Better be Tired
Better be Tired

Pop-Punk, Male Voice

Вне Земли
Вне Земли

Мощный, альтернативный рок, фолк, рок, синтезатор, барабаны, бас, соул, душевный, гитара, математический рок, acoustic

Night Flight
Night Flight

amazing unique stereo delayed echo flanger chorus 1980s aor rock reverb dark ambient

syas
syas

romance

STRESSED OUT
STRESSED OUT

alternative R&B, melodic rap, trap, male voice, deep voice, afroswing

Blazing Summer
Blazing Summer

Energetic reggae with African and hip-hop influences, BPM123, Male vocals, synthpop,chill, groovy

Lin Yang fly high (麟洋fly figh)
Lin Yang fly high (麟洋fly figh)

pop, beat, catchy, upbeat, male vocals, drum, bass, electronic, funk, rap

Stay in the Fight
Stay in the Fight

alternative hip hop

Lonely Hearts and Broken Homes
Lonely Hearts and Broken Homes

acoustic melodic country

Kite Day
Kite Day

light nostalgic whimsical classical, soft, slow build, inspirational

Underwater Dreams
Underwater Dreams

phonk 8bit trippy weird wet slow post experimental soothing noise static lofi amphibious transistor radio

Kill or be Killed
Kill or be Killed

a japanese vocaloid upbeat and happy style of music, think nintendo but music

Infinite Regrets
Infinite Regrets

catchy symphonic atmospheric harmony, one female vocals, energetic metal guitar riffing, nu mathmetal, j-trance backup

Class Of  '99 Part II
Class Of '99 Part II

90s hip-hop, groovy hip-hop dance, beat, industrial, techno, rap

Midwest Jared Welcome Anthem
Midwest Jared Welcome Anthem

Deep thumping bass, powerful welcome, rhythmic unity, justice and truth, vibrant spirit.

All Inside
All Inside

rap rock, alternative metal, nu metal, drums, hip hop beat