C
C#2y ago
kiteflora

❔ Console Game Project (Memory Matching)

Hi all! I'm not sure if this is the right channel, but I have a question... I'm New to programming (computer science major) I have a home project to create a simple c# console game. It's like a memory matching game which shows card values for a given number of time (depending on difficulty level) for example: Card 14: Dog Card 3: House (Because the cards don't match they are supposed to be erased from the console in x amount of time, say 3 seconds, and the player has to choose again another pair of cards he thinks will match) How do I code this timing function that will 'hide (clear)' the cards after a given amount of time)? Thanks in advance! Our university teaches c#, so my project has to be in c# (visual studio)
4 Replies
Angius
Angius2y ago
Use a timer We currently have, like, 7 different timers in C#, so just pick one
kiteflora
kiteflora2y ago
Hey, thanks for the response How to I navigate to the timer? Are there any specific functions/data structures/ tabs in visual studio you can recommend for this?
Angius
Angius2y ago
Timers are a .NET thing, it's not something specific to VS Task.Delay() I think will be what you want
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server
More Posts
Find all HREFs out of string and extract valueHey, I am currently developing a web scraper and therefore want to extract all available information❔ How to store session data backend?I'm building a similar game to skribbl.io which is a drawing game where you draw with other people. ❔ How do i sort a list of objects by multiple possible itemsHey, i'm trying to write a method to return a list of objects by letting the user choose which item ❔ ASP.NET Core how to let a controller be mapped only in development modeThis is pretty easy to do with minimal API's, you just do a check and map only if it succeeds: ```cs❔ Turn off VS 2022 PreviewHow do I turn off VS 2022 Preview? It is showing on the splash screen and everywhere. I turned it on❔ Winforms rotated text in `ToolStripButton` appears boldWhen setting the direction of text to e.g. Vertical270, the text in the button becomes different, eiIf I do console.clear() it just skips a bunch of lines instead of clearingI am using vsc c# and I think its an error with .net because I saw a few forums talking about it, pl❔ Why wont visual studio auto format this with CTRL K + CTRL D?can anyone think of why visual studio wont format these lambda arrows with `CTRL K + CTRL D` but it ❔ Changing TextBlock Background property in a static methodThe method needs to be static (unless there are implementations of LowLevelKeyboardProc that doesn't❔ SQLite with Muai ensure connectionstring to DB for all devicesIm running SQLite db and i want the connection to the DB to point to the same file no matter if i ru