packages feed

SoccerFunGL 0.4.1 → 0.4.2

raw patch · 3 files changed

+30/−4 lines, 3 filesdep ~SoccerFunnew-component:exe:sfRunMatch

Dependency ranges changed: SoccerFun

Files

SoccerFun/UI/GL.hs view
@@ -130,14 +130,14 @@ 			GL.translate $ vector2 (l/2,w/2) 			GL.renderPrimitive GL.LineLoop $ circle radiusCentreCircle 23 			GL.renderPrimitive GL.Polygon $ circle radiusCentreSpot 7-		colorRGB (1,1,1) -- white-		mapM_ renderPole [(x,y) | let (n,s) = goalPoles field, y ← [n,s], x ← [0,l]] -- goal poles 		GL.preservingMatrix $ do 			GL.translate $ vector2 (penaltySpotDepth, w/2) 			GL.renderPrimitive GL.Polygon $ circle radiusPenaltySpot 7 		GL.preservingMatrix $ do 			GL.translate $ vector2 (l - penaltySpotDepth, w/2) 			GL.renderPrimitive GL.Polygon $ circle radiusPenaltySpot 7+		colorRGB (1,1,1) -- white+		mapM_ renderPole [(x,y) | let (n,s) = goalPoles field, y ← [n,s], x ← [0,l]] -- goal poles  	renderPole pos = GL.preservingMatrix $ do 		colorRGB (0.3,0.3,0.3)
+ SoccerFun/UI/GL/RunMatch.hs view
@@ -0,0 +1,23 @@+{-# LANGUAGE UnicodeSyntax #-}+-- | Usage: Hit /q/ to abort the match+module Main where++import SoccerFun.UI.GL+import Control.Monad+import System.Exit+import Prelude.Unicode+import Data.Binary+import SoccerFun.MatchGame+import SoccerFun.Tape++main ∷ IO ()+main = do+	(prog,args) ← initialise+	let (t1,t2) = case args of+		[t1,t2] → (t1,t2)+		notTwo → error $ unlines+			["Run a match between two teams <Team1> and <Team2>",+			 "Usage: " ⧺ prog ⧺ " <dir1> <dir2>",+			 "  where both arguments are paths to directories containing a team module."]+	(t1name,t2name,match) ← dynSetupMatch t1 t2+	playTape $ recordMatch match
SoccerFunGL.cabal view
@@ -1,5 +1,5 @@ Name:           SoccerFunGL-Version:        0.4.1+Version:        0.4.2 Copyright:      (c) 2010, Jan Rochel License:        BSD3 License-File:   LICENSE@@ -23,9 +23,12 @@     binary >= 0.5 && < 0.6,     GLUT >= 2.2 && < 2.3,     OpenGL >= 2.4 && < 2.5,-    SoccerFun >= 0.4 && < 0.5+    SoccerFun >= 0.4.2 && < 0.5   Exposed-Modules:     SoccerFun.UI.GL  Executable sfPlayTape   Main-Is: SoccerFun/UI/GL/PlayTape.hs++Executable sfRunMatch+  Main-Is: SoccerFun/UI/GL/RunMatch.hs