blob: 4a6fb370b93584e8a2f8a6726272062f678b72ca (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
{-# LANGUAGE DeriveDataTypeable #-}
module CPUPlayer ( CPUPlayer(..)
) where
import Data.Fixed
import Data.Ratio ((%))
import Data.Typeable
import GLDriver
import Player
data CPUPlayer = CPUPlayer Micro
deriving (Typeable, Show)
instance Player CPUPlayer where
playerUpdate (CPUPlayer angle) _ = (CPUPlayer (if (angle+0.1) > 180 then angle-359.08 else angle+0.02), Just angle, True, Just (-angle), False)
|