Skip to content
← Back to Community
Bankrupt the Bank
Profile icon
VulcanWM

This is my second game in js: Bankrupt the Bank.

I originally got this idea while playing monopoly with my cousin. We kind of got bored giving each other rent, and teamed up to get all the money from the bank. When I lost all my game ideas, I remembered our game and based this on the game.

Most of my games are based on luck, and this one is as well. I got the idea of the cards from @Bookie0 's and @ChezCoder 's game 4 Chances.

Thanks @aguy11 for the logo on the card!

If you have any ideas on how this game could be better, comment below.

Voters
Profile icon
forceofyoda
Profile icon
huhelena8
Profile icon
gibbsfreenergy
Profile icon
CodingGoose
Profile icon
AgastyaSandhuja
Profile icon
Safariminer
Profile icon
octopyBot
Profile icon
jrjamir
Profile icon
SilentShadowBla
Profile icon
HerculukeZeEpic
Comments
hotnewtop
Profile icon
MarblesAndMore

After a while, I was finally able to defeat the bank!
Screenshot 2020-08-11 at 20.52.38
Great game!

Profile icon
VulcanWM

That's definitely changing the code. Thanks @MarblesAndMore

Profile icon
MarblesAndMore

@VulcanWM What do you mean I didn't change the code?

Profile icon
VulcanWM

There is no way you can win like that! @MarblesAndMore

Profile icon
MarblesAndMore

Really? @VulcanWM

Profile icon
MarblesAndMore

@VulcanWM I am honestly so bad at coding it would be almost impossible for me to do that.

Profile icon
VulcanWM
Profile icon
MarblesAndMore

@VulcanWM almost what?

Profile icon
MatthewXia

@VulcanWM i won with -5 for the bank and like 1105 for me. i didn't change the code

Profile icon
NoNameByProgram

-3 in the bank

Profile icon
userSM

@VulcanWM, your profile picture is a times table Rock stars avatar, right?

Profile icon
VulcanWM

Bingo! Yeah, my friend had that avatar, and I kind of liked it. @userSM

Profile icon
octopyBot

@userSM sry to necropost but its a pfp not avatar

Profile icon
userSM

@octopyBot no his profile pic used to be different

Profile icon
octopyBot

@userSM no I meant its not called an avatar its called a pfp. or profile pic. also I know that, to me it looked like scream? like the painting.

Profile icon
garthfausto

Thanks for sharing.

Profile icon
huhelena8

I'm American give meh some dollars instead-

Profile icon
syc1

bank = -10000;
boom i won

Profile icon
VulcanWM

Can't see any evidence of that @syc1

Profile icon
syc1

@VulcanWM no care

Profile icon
VulcanWM
Profile icon
potatojs
Profile icon
VulcanWM
Profile icon
[deleted]

This is pretty good

Profile icon
VulcanWM
Profile icon
Sesquipedelian

yay!

Profile icon
VulcanWM

Did you bankrupt the bank? @Sesquipedelian

Profile icon
CringyCatWasTaken

This is really good! :D

Profile icon
VulcanWM
Profile icon
N3rdL0rd
Profile icon
VulcanWM
Profile icon
dabs364

wow

Profile icon
VulcanWM

wow to what? @dabs364

Profile icon
dabs364

@VulcanWM oh

AMAZING THEN

NOW CHECK

Profile icon
VulcanWM

Thanks @dabs364

Profile icon
glitchish
Profile icon
glitchish
Profile icon
LTI2
Profile icon
VulcanWM

definitely @LTI2

Profile icon
zplusfour

nice daedalus pfp

Profile icon
VulcanWM

Thanks @ZDev1

Profile icon
zplusfour
Profile icon
Leroy01010

xtremely good game

Profile icon
VulcanWM
Profile icon
zplusfour

This file cannot be displayed:
Inspecting, running code in firefox console...
after a lot of functions, we I did it!

A LOT OF LOLs

Profile icon
Leroy01010
Profile icon
11ma

haha, i love playing monopoly, this makes me feel like i'm robbing the bank

Profile icon
VulcanWM
Profile icon
Bookie0
Profile icon
VulcanWM

Yeah man, I'm from the UK @Bookie0

Profile icon
Bookie0

Lol nice @VulcanWM

Profile icon
AustinZhang1

Nice game! Can you give me feedback on my game: https://repl.it/talk/share/Game-The-Life-of-a-Robber/49126

Profile icon
VulcanWM

Thanks, sure @AustinZhang1

Profile icon
[deleted]

Nice! And congrats in 2k cycles!

Profile icon
VulcanWM
Profile icon
PowerCoder
Profile icon
VulcanWM

You've definitely changed the code @PowerCoder

Profile icon
PowerCoder

@VulcanWM LOL yeah

Profile icon
PowerCoder

@VulcanWM This game is very hackable

Profile icon
VulcanWM

yh I know. Do you know a way I can make this unhackable? @PowerCoder

Profile icon
aguy11

@VulcanWM Make it all into one function so that you can't just call a certain function to hack it. That makes it less hackable, though hacking it's still possible.

Profile icon
PowerCoder

@VulcanWM You can wrap the whole thing in an anoymouos function like so:

(function() { })

This will call the anonymous function immediately after declaration.

Profile icon
VulcanWM

Do you know the code for it, cos I don’t know @aguy11

Profile icon
VulcanWM

Oh right, I’ll do that. Thanks! @PowerCoder

Profile icon
VulcanWM

It's not working :( @PowerCoder

Profile icon
aguy11

@VulcanWM I don't really know JS, and it would be hackable anyway, but here's my prediction:

// This is really unnecessary and unorganized, but it's the best example I can give. window.onload function game() { // Basically do all of the stuff here(Even function declaring), so hackers can't reference a single part of the program and be done. }

Yeah, this was a very short example.

Hope this helps!

Profile icon
VulcanWM
Profile icon
[deleted]

@aguy11 I dont know why but I always add a

function supersecrethack() { score = score + 10000000000000; }

to my JS games. All you have to do is Ctrl + Shift + J and you enter this function into the console.

Profile icon
zplusfour

@aguy11 no no no no

function somefunc(name){ alert(name) } window.onload = somefunc('creeper aw man')
Profile icon
aguy11

Maybe use this for the card logo? (Sorry, I'm not too good at art)
card

Profile icon
VulcanWM

That is good! Imma add it @aguy11

Profile icon
aguy11

This took me a few tries. You're getting better at non-hackable games.

I definitely didn't just hack:

Screen Shot 2020-08-10 at 11.08.59 AM

You should use a different font. Maybe Oswald Light 300 from Google Fonts using the following import URL?

@import url('https://fonts.googleapis.com/css2?family=Oswald:[email protected]&display=swap');
Profile icon
VulcanWM

Sure thanks, I'll try that @aguy11

Profile icon
aguy11

@VulcanWM No problem.

Profile icon
aruba

You have successfully done the hard part, could you take the game to the next level, and play Chemin de fer, showing the bank and the players hand, and allow the player to stand or say "Banco"

Profile icon
VulcanWM

Maybe, I'm not that great at animations tho @aruba

Profile icon
zplusfour

well good javascript
also styling

Profile icon
VulcanWM

Thanks @ZDev1

Profile icon
zplusfour

@VulcanWM np
if you want any help just ping me

Profile icon
Pizzaz4me

this is really cool!

Profile icon
VulcanWM
Profile icon
EpicGamer007

Good job! Can you give me the link to your first game(in js)?

Profile icon
VulcanWM
Profile icon
LTI2
Profile icon
VulcanWM

Definitely @LTI2

Profile icon
DynamicSquid

@LTI2 now that's some serious

S T O N K S

Profile icon
LTI2
Profile icon
Coder100

Nice!

Profile icon
VulcanWM

Thanks! @Coder100

Profile icon
DynamicSquid

S T O N K S

Profile icon
VulcanWM