This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
set /a wins=0 | |
set /a losses=0 | |
set /a ties=0 | |
:game_loop | |
cls | |
echo Rock Paper Scissors Game | |
echo. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tkinter as tk | |
import random | |
# Constants | |
CARD_VALUES = { | |
'Ace': 11, | |
'Two': 2, | |
'Three': 3, | |
'Four': 4, | |
'Five': 5, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: | |
:: 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. | |
:: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"time" | |
) | |
func main() { | |
rand.Seed(time.Now().UnixNano()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"time" | |
) | |
type monster struct { | |
name string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
) | |
func main() { | |
var numDisks int | |
fmt.Print("Enter the number of disks: ") | |
fmt.Scanln(&numDisks) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"time" | |
) | |
const ( | |
NumHoles = 6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"time" | |
) | |
const ( | |
MaxAttempts = 3 |