Skip to content

Instantly share code, notes, and snippets.

View R3DHULK's full-sized avatar
🏠
Working from home

Sumalya Chatterjee R3DHULK

🏠
Working from home
View GitHub Profile
@R3DHULK
R3DHULK / rps.bat
Created April 11, 2023 15:57
Rock Paper Scissor In Batch Programming
@echo off
set /a wins=0
set /a losses=0
set /a ties=0
:game_loop
cls
echo Rock Paper Scissors Game
echo.
@R3DHULK
R3DHULK / hangman.bat
Created April 11, 2023 15:46
Hangman In Batch Programming
@echo off
setlocal EnableDelayedExpansion
set words=apple banana cherry durian elephant fig grapefruit
set /a max_guesses=7
set /a num_guesses=0
set word_length=0
set word=""
set guessed_letters=
@R3DHULK
R3DHULK / blackjack.py
Created April 11, 2023 15:36
Blackjack in gui in python
import tkinter as tk
import random
# Constants
CARD_VALUES = {
'Ace': 11,
'Two': 2,
'Three': 3,
'Four': 4,
'Five': 5,
@R3DHULK
R3DHULK / snake.bat
Created April 11, 2023 15:21
Snake Game In Batch Programming
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: SNAKE.BAT - A pure native Windows batch implementation of the classic game
:: ------------------------------------------------------------------------------
:: Written by Sumalya Chatterjee
::
:: The game should work on any Windows machine from XP onward using only batch
:: and native external commands. However, the default configuration will most
:: likely have some screen flicker due to the CLS command issued upon every
:: screen refresh.
::
@R3DHULK
R3DHULK / blackjack.bat
Created April 11, 2023 15:13
Blackjack In Batch Programming
@echo off
title Blackjack Game
set /a deck[1]=11, deck[2]=2, deck[3]=3, deck[4]=4, deck[5]=5, deck[6]=6, deck[7]=7, deck[8]=8, deck[9]=9, deck[10]=10, deck[11]=10, deck[12]=10, deck[13]=10
set /a player_total=0
set /a dealer_total=0
:shuffle
cls
echo Shuffling the deck...
@R3DHULK
R3DHULK / simon_says.go
Created March 28, 2023 17:55
Simon Says In Go
package main
import (
"fmt"
"math/rand"
"time"
)
func main() {
rand.Seed(time.Now().UnixNano())
@R3DHULK
R3DHULK / monster-battle.go
Created March 28, 2023 17:53
Monster Battle In Go
package main
import (
"fmt"
"math/rand"
"time"
)
type monster struct {
name string
@R3DHULK
R3DHULK / towerofhanoi.go
Created March 28, 2023 17:50
Tower Of Hanoi Written In Go
package main
import (
"fmt"
)
func main() {
var numDisks int
fmt.Print("Enter the number of disks: ")
fmt.Scanln(&numDisks)
@R3DHULK
R3DHULK / whac-the-mole.go
Created March 28, 2023 17:39
Whac The Mole In Go
package main
import (
"fmt"
"math/rand"
"time"
)
const (
NumHoles = 6
@R3DHULK
R3DHULK / football-game.go
Created March 28, 2023 17:32
Football Game Written In Go
package main
import (
"fmt"
"math/rand"
"time"
)
const (
MaxAttempts = 3