forked from Aerolab/blockrain.js
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtwoPlayer.html
136 lines (109 loc) · 5.44 KB
/
twoPlayer.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Blockrain.js - A Tetris game in HTML5 + Javascript (with autoplay!)</title>
<meta name="description" content="Blockrain.js lets you embed the classic Tetris game on your website" />
<meta name="keywords" content="js, jquery, game, plugin, html5, tetris" />
<meta name="robots" content="INDEX, FOLLOW" />
<meta name="author" content="Aerolab" />
<!-- Facebook Stuff -->
<meta property="og:type" content="website" />
<meta property="og:site_name" content="Blockrain.js" />
<meta property="og:title" content="Blockrain.js - a Tetris game in HTML5 + Javascript" />
<meta property="og:description" content="Blockrain.js lets you embed the classic Tetris game on your website" />
<meta property="og:image" content="http://aerolab.github.io/blockrain.js/assets/images/social-card.png" />
<meta property="og:url" content="http://aerolab.github.io/blockrain.js" />
<meta property="fb:app_id" content="344819049029949" />
<!-- Twitter Stuff -->
<meta property="twitter:card" content="summary" />
<meta property="twitter:site" content="@aerolab" />
<meta property="twitter:title" content="Blockrain.js - a Tetris game in HTML5 + Javascript" />
<meta property="twitter:description" content="Blockrain.js lets you embed the classic Tetris game on your website" />
<meta property="twitter:image" content="http://aerolab.github.io/blockrain.js/assets/images/social-card.png" />
<meta property="twitter:url" content="http://aerolab.github.io/blockrain.js" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui" />
<link rel="shortcut icon" href="assets/images/favicon.png">
<link href='http://fonts.googleapis.com/css?family=Play:400,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="assets/css/style.css">
<link rel="stylesheet" href="src/blockrain.css">
</head>
<body>
<section id="examples">
<!-- <header>
<h1>Check out the demo</h1>
</header> -->
<!-- <article id="example-slider"> -->
<div class="example">
<div class="game" id="tetris-demo"></div>
<div class="game" id="tetris-demo-2"></div>
</div>
<!-- </article> -->
</section>
<script src="http://cdn.peerjs.com/0.3/peer.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/seedrandom/2.3.11/seedrandom.min.js"></script>
<script src="assets/js/jquery-1.11.1.min.js"></script>
<!-- <script src="../../blockparty.js"></script> -->
<script src="src/blockrain.jquery.libs.js"></script>
<script src="src/blockrain.jquery.src.js"></script>
<script src="src/blockrain.jquery.themes.js"></script>
<script>
var $demo = $('#tetris-demo').blockrain({
autoplay: false, // Let a bot play the game
autoplayRestart: true, // Restart the game automatically once a bot loses
showFieldOnStart: true, // Show a bunch of random blocks on the start screen (it looks nice)
theme: 'candy', // The theme name or a theme object
blockWidth: 10, // How many blocks wide the field is (The standard is 10 blocks)
autoBlockWidth: false, // The blockWidth is dinamically calculated based on the autoBlockSize. Disabled blockWidth. Useful for responsive backgrounds
autoBlockSize: 24, // The max size of a block for autowidth mode
difficulty: 'normal', // Difficulty (normal|nice|evil).
speed: 20, // The speed of the game. The higher, the faster the pieces go.
asdwKeys: true, // Enable ASDW keys
arrowKeys:false,
seed:'BlockParty',
// Copy
playText: 'Let\'s play',
playButtonText: 'Play',
gameOverText: 'Game Over',
restartButtonText: 'Play Again',
scoreText: 'Score',
// Basic Callbacks
onStart: function(){},
onRestart: function(){},
onGameOver: function(score){},
// When a block is placed
onPlaced: function(){},
// When a line is made. Returns the number of lines, score assigned and total score
onLine: function(lines, scoreIncrement, score){}
})//.blockrain('controls', false);
var $demo2 = $('#tetris-demo-2').blockrain({
autoplay: false, // Let a bot play the game
autoplayRestart: true, // Restart the game automatically once a bot loses
showFieldOnStart: true, // Show a bunch of random blocks on the start screen (it looks nice)
theme: 'candy', // The theme name or a theme object
blockWidth: 10, // How many blocks wide the field is (The standard is 10 blocks)
autoBlockWidth: false, // The blockWidth is dinamically calculated based on the autoBlockSize. Disabled blockWidth. Useful for responsive backgrounds
autoBlockSize: 24, // The max size of a block for autowidth mode
difficulty: 'normal', // Difficulty (normal|nice|evil).
speed: 20, // The speed of the game. The higher, the faster the pieces go.
asdwKeys: false, // Enable ASDW keys
arrowKeys:true,
seed:'BlockParty',
// Copy
playText: 'Let\'s play',
playButtonText: 'Play',
gameOverText: 'Game Over',
restartButtonText: 'Play Again',
scoreText: 'Score',
// Basic Callbacks
onStart: function(){},
onRestart: function(){},
onGameOver: function(score){},
// When a block is placed
onPlaced: function(){},
// When a line is made. Returns the number of lines, score assigned and total score
onLine: function(lines, scoreIncrement, score){}
})//.blockrain('controls', false);
</script>
</body>
</html>