Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <script>
- //Home_Team=====================================================================================
- var home_team = ("JG");
- var home_team_capting = ("Jahid");
- var home_team_first = ["Bat", "Bowl"]
- var home_team_first_random = Math.floor(Math.random()*home_team_first.length);
- var home_team_first_choice = (home_team_first[home_team_first_random]);
- document.write("Home Team: "+home_team_capting+" First Choice "+home_team_first_choice+"<br/>");
- //Away_Team======================================================================================
- var away_team = ("SMF KORIM");
- var away_team_capting = ("Tareq");
- var away_team_first = ["Bat", "Bowl"]
- var away_team_first_random = Math.floor(Math.random()*away_team_first.length);
- var away_team_first_choice = (away_team_first[away_team_first_random]);
- document.write("Away Team: "+away_team_capting+" First Choice "+away_team_first_choice+"<br/><br/>");
- //Game Name=============================================================================================
- document.write("=================================<br/>");
- document.write("=== Dream Team Cricket Manager Game ===<br/>");
- document.write("=================================<br/><br/>");
- //Toss_Option===========================================================================================
- var toss_select = ['"Heads"','"Tails"'];
- var toss_select_random = Math.floor(Math.random()*toss_select.length);
- var toss_win = ["Heads","Tails"];
- var toss_win_random = Math.floor(Math.random()*toss_win.length);
- document.write("=== "+home_team+" VS "+away_team+" ==="+"<br/><br/>"+home_team_capting+ ' spins the coin and '+away_team_capting+ ' calls '+toss_select[toss_select_random]+'. '+toss_win[toss_win_random]+ " it is.<br/>");
- if(toss_select_random==toss_win_random){
- //document.write(away_team_first_random[away_team_first_choice]);
- if(away_team_first_choice != "Bowl"){
- document.write(away_team+" win the toss and decide to "+away_team_first_choice+" first.<br><br>"+"=========================<br>"+"=== "+away_team+" INNINGS ==="+"<br>=========================");
- }
- else{
- document.write(away_team+" win the toss and decide to "+away_team_first_choice+" first.<br><br>"+"=== "+home_team+" INNINGS ===");
- };
- }
- else{
- if(home_team_first_choice != "Bowl"){
- document.write(home_team+" win the toss and decide to "+home_team_first_choice+" first.<br><br>"+"=== "+home_team+" INNINGS ===");
- }
- else{
- document.write(home_team+" win the toss and decide to "+home_team_first_choice+" first.<br><br>"+"=== "+away_team+" INNINGS ===");
- };
- };
- var overs = 20
- var balls = overs * 6
- for(x=1; x<balls; x++){
- document.write("<br>Over: "+x)
- };
- </script>
- </head>
- <body>
- </body>
- <footer>
- </footer>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement