File: the_double.lua

package info (click to toggle)
blobby 1.1.1%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,944 kB
  • sloc: cpp: 22,442; xml: 779; python: 56; makefile: 3
file content (20 lines) | stat: -rw-r--r-- 411 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
__AUTHOR__ = "chameleon"
__TITLE__  = "Crazy Volley - The Double"
function OnBallHitsPlayer(player)
	local opp = opponent(player)
	if touches(player) > 2 then
		mistake(player, opp, 1)
	end
	if touches(opp) == 1 then
		mistake(opp, player, 1)
	end
end

function OnBallHitsGround(player)
	local opp = opponent(player)
	if touches(opp) == 1 then
		mistake(opp, player, 1)
	else
		mistake(player, opp, 1)
	end
end