@model TestMvcApp.ViewModel
var result = ViewBag.Result as TestMvcApp.InputParams;
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My ASP.NET Application</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
<div class="container body-content">
<h3>What you need to do?</h1>
Please enter amount and numbet of players.<br />
Example: Amount = 10, Players = 3. <br />
Don't put big numbers in this tool, this tool has limited execution time.<br />
The code supposed to work this way:<br />
When you click on "Start" button each player will take 0.1 from the amount and will wait 100ms until next round.<br />
The code need to stop when 1 left in balance.<br />
Please make shure 1 always stayes in balance.
<h1>Init amount:@result.InitAmount</h1>
<h1>Count people:@result.CountPeople</h1>
<h1>Balance after simulate:@result.BalanceAmount</h1>
<input type="submit" value="Start"/>
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>