Nomnomfighter
Nomnomfighter
CC#
Created by Nomnomfighter on 7/11/2024 in #help
✅ Trying to add tic tac toe board snapshot to variable for display of full match later
Code: https://paste.ofcode.org/n4KiPrNa8pyHiyWGuks93e I'm trying to check some weird nonsense with ttt, specifically automating games to check some data. Part of that was seeing how the game behaves when you can overwrite symbols but your moves are random. For that, I'm trying to keep a snapshot of every move. I have tried it with just outputting which cell it had overwritten, but because of my implementation that doesn't show the cell number if there was already a mark placed. I can't seem to find a way to add the Board() output into a variable for later calling
14 replies
CC#
Created by Nomnomfighter on 9/23/2023 in #help
❔ ✅ While loop takes input but gives out output + two phantom outputs
working on a simple rock, paper, scissor game. After a few tries with if statements, I changed to switch statements, but both have the same problem. Code looks like this: https://paste.ofcode.org/TWijGyx4rzUSdgdVi4mWTS running it looks like this: https://gyazo.com/42a2a8891da011b6ca32ec5e2eaf49ff The two extra prompts + "invalid input" happen all the time aside from choosing 'e'. I assume that's because I've specifically put stopPlaying = true there. However, it shouldn't touch the default case when the input is valid and it definitely shouldn't repeat the prompt + default twice at all after processing the input. What am I missing here?
17 replies
CC#
Created by Nomnomfighter on 9/20/2023 in #help
✅ Trying to round a value but there's seemingly no elegant way to do it?
I've tried two versions (seen here: https://paste.ofcode.org/HXfb53WkUWfRCz8mvTpQTg) But the first (more elegant solution) doesn't work and the second seems unnecessarily backwards?
9 replies
CC#
Created by Nomnomfighter on 5/17/2023 in #help
✅ Blackjack Dealer goes into an infinite loop (SOLVED)
https://paste.ofcode.org/egKC5vE9biPBKhFyNhuksQ Loop only happens if a) the Dealer stands, i.e. has a total between 17 and 20 inclusive and b) the player is at exactly 21/Blackjack. The loop then only gives out debug output on Line 44 ("the dealer stands on {cardDealer}"). There are two variables, called stand (for the dealer) and playerStand (for the player) that should end the while loop of card drawing opportunities and go into the result calculation beginning with the if @ Line 77
93 replies