All Questions
Tagged with simulation c#
14
questions
1
vote
1
answer
2k
views
C# Coffee Machine
I saw this post and tried to do my attempt. This is the requirement of task:
Design a coffee machine which makes different beverages based on set
ingredients. The initialization of the recipes for ...
2
votes
1
answer
296
views
Maxwell's distribution using Box-Muller transform
I am given the following problem to solve (This text is translated from Russian. So, there may be some translation issues):
... Another method to draw from the normal distribution is to draw two ...
7
votes
1
answer
253
views
Generating Infinite Procedural Terrain Using Command-Line Graphics
Continuing my trend of (ab)using the Windows command-line interface to do fancy graphics-related things with my command-line-graphics library, CLIGL, I've created an infinite procedural terrain ...
3
votes
1
answer
404
views
Langton's Ant simulation
I created a simple program to simulate the Ant's path. The Ant moves north, west, east and south. Each time the Anth moves to an "uncharted" location, I build a Square and give it a color. Each time ...
2
votes
1
answer
123
views
Analog watch simulation
I wrote an analog watch simulation in C# and Monogame as exercise.
The application consists of a background texture. On top of that I have the hour-, minute- and second hand.
The program gets its ...
1
vote
1
answer
290
views
Coin tossing simulation to get x heads in a row, ten times - timely at higher amount of heads
I have created a program to simulate a coin being tossed to land on heads/tails x amount of times in a row, where x can be defined by the user. The program then gets x amount of heads in a row, a ...
2
votes
0
answers
609
views
Routing simulation (Distance vector)
I am trying to write simulation for routing algorithm by distance vector. I will explain my class and how it works a bit, and then, introduce three main issues I encouter. Important to mention that ...
2
votes
1
answer
135
views
Loop combinations of byte for Poker simulator
In (this) Poker you have 2 hole cards that are combined with 5 shared cards on the board. Each player makes the best 5 card hand from the seven. Believe it or not that is over 2 billion runs to do ...
3
votes
2
answers
2k
views
Betting strategy simulation
I lately got interested into betting systems, dice strategies and algorithms. I took some time to think about it and eventually ended up with an algorithm of my own.
Considering that I don't have ...
5
votes
3
answers
137
views
Statistical Analysis of X-Wing Game Dice
I was in a discussion about mechanics of the X-Wing miniatures game where we were discussing a couple of the ways to improve attacks and I put together this small C# console application to determine ...
12
votes
2
answers
338
views
How Long Will Your Smartphone Distract You From Family Dinner?
I wrote a program to simulate this week's 538 Riddler, reproduced below:
You’ve just finished unwrapping your holiday presents. You and your
sister got brand-new smartphones, opening them at the ...
0
votes
2
answers
130
views
Get neighbour sides of a Rubics cube
I'm writing 2x2x2 rubics cube simulator. In my code I have a concept of Face which is individual side of the cube, and State which is agregate of all six sides. When I create new State, in addition to ...
7
votes
2
answers
1k
views
5 Customers, but only 1 Bank Teller
Recently, as part of an interview, I was given a (seemingly) simple code prompt: To simulate a Bank with 5 customers and one teller, allowing them to deposit to and withdraw from their accounts, but ...
2
votes
1
answer
1k
views
Simulation Framework
I started creating a small abstract simulation framework and would be happy if someone could take a look at the code and give me feedback on it.
The code can be found here, and it is currently not in ...