Skip to content

Commit

Permalink
Replaced imports with require's.
Browse files Browse the repository at this point in the history
  • Loading branch information
muhuk committed Jan 8, 2015
1 parent b6fc151 commit 22de34f
Show file tree
Hide file tree
Showing 11 changed files with 50 additions and 54 deletions.
4 changes: 2 additions & 2 deletions clecs-tetris/project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
:license {:name "GNU GPL v3"
:url "http://www.gnu.org/licenses/gpl-3.0.en.html"}
:dependencies [[org.clojure/clojure "1.6.0"]
[clecs "1.0.2-SNAPSHOT"]
[seesaw "1.4.4"]]
[clecs "1.1.0-SNAPSHOT"]
[seesaw "1.4.5"]]
:main ^:skip-aot clecs-tetris.core
:target-path "target/%s"
:profiles {:dev {:dependencies [[midje "1.6.3"]]}
Expand Down
9 changes: 4 additions & 5 deletions clecs-tetris/src/clecs_tetris/world/system/gravity.clj
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@
[clecs.world :as world]
[clecs-tetris.world.component :refer [->CurrentShapeComponent
->GlassTileComponent
->TargetLocationComponent]])
(:import [clecs_tetris.world.component
CurrentShapeComponent
GlassTileComponent
TargetLocationComponent]))
->TargetLocationComponent
CurrentShapeComponent
GlassTileComponent
TargetLocationComponent]]))


(declare -move-target-location)
Expand Down
10 changes: 5 additions & 5 deletions clecs-tetris/src/clecs_tetris/world/system/new_shape.clj
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
(ns clecs-tetris.world.system.new-shape
(:require [clecs-tetris.world.component :refer [->CurrentShapeComponent
->TargetLocationComponent]]
->TargetLocationComponent
CurrentShapeComponent
NextShapeComponent
TargetLocationComponent]]
[clecs.query :as query]
[clecs.world :as world])
(:import (clecs_tetris.world.component CurrentShapeComponent
NextShapeComponent
TargetLocationComponent)))
[clecs.world :as world]))


(defn -can-create-new-shape? [w]
Expand Down
6 changes: 3 additions & 3 deletions clecs-tetris/src/clecs_tetris/world/system/next_shape.clj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
(ns clecs-tetris.world.system.next-shape
(:require [clecs-tetris.world.component :refer [->NextShapeComponent]]
(:require [clecs-tetris.world.component :refer [->NextShapeComponent
NextShapeComponent]]
[clecs.query :as query]
[clecs.world :as world])
(:import (clecs_tetris.world.component NextShapeComponent)))
[clecs.world :as world]))


(defn -add-shape [shape]
Expand Down
13 changes: 6 additions & 7 deletions clecs-tetris/src/clecs_tetris/world/system/rendering.clj
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
(ns clecs-tetris.world.system.rendering
(:require [clecs-tetris.world.component]
(:require [clecs-tetris.world.component :refer [GlassTileComponent
LevelComponent
LinesDroppedComponent
NextShapeComponent
ScoreComponent]]
[clecs-tetris.world.protocol :as protocol]
[clecs.query :as query]
[clecs.world :as world])
(:import (clecs_tetris.world.component GlassTileComponent
LevelComponent
LinesDroppedComponent
NextShapeComponent
ScoreComponent)))
[clecs.world :as world]))


(defn -get-next-shape [w]
Expand Down
10 changes: 5 additions & 5 deletions clecs-tetris/src/clecs_tetris/world/system/update_shape.clj
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
(ns clecs-tetris.world.system.update-shape
(:require [clecs-tetris.world.component :refer [->CurrentShapeComponent
->GlassTileComponent
->TargetLocationComponent]]
->TargetLocationComponent
CurrentShapeComponent
GlassTileComponent
TargetLocationComponent]]
[clecs.query :as query]
[clecs.world :as world])
(:import (clecs_tetris.world.component CurrentShapeComponent
GlassTileComponent
TargetLocationComponent)))
[clecs.world :as world]))


(defn -set-glass-tile [w x y tile]
Expand Down
10 changes: 5 additions & 5 deletions clecs-tetris/test/clecs_tetris/world/system/gravity_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
[clecs.world :as world]
[clecs-tetris.world.component :refer [->CurrentShapeComponent
->GlassTileComponent
->TargetLocationComponent]]
->TargetLocationComponent
CurrentShapeComponent
GlassTileComponent
TargetLocationComponent]]
[clecs-tetris.world.system.gravity :refer :all]
[midje.sweet :refer :all])
(:import [clecs_tetris.world.component CurrentShapeComponent
GlassTileComponent
TargetLocationComponent]))
[midje.sweet :refer :all]))



Expand Down
11 changes: 5 additions & 6 deletions clecs-tetris/test/clecs_tetris/world/system/new_shape_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@
[clecs.world :as world]
[clecs-tetris.world.component :refer [->CurrentShapeComponent
->NextShapeComponent
->TargetLocationComponent]]
->TargetLocationComponent
CurrentShapeComponent
NextShapeComponent
TargetLocationComponent]]
[clecs-tetris.world.system.new-shape :refer :all]
[midje.sweet :refer :all])
(:import [clecs_tetris.world.component
CurrentShapeComponent
NextShapeComponent
TargetLocationComponent]))
[midje.sweet :refer :all]))


(fact "-can-create-new-shape? does nothing if there is a current shape."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
mock-world]]
[clecs.query :as query]
[clecs.world :as world]
[clecs-tetris.world.component :refer [->NextShapeComponent]]
[clecs-tetris.world.component :refer [->NextShapeComponent
NextShapeComponent]]
[clecs-tetris.world.system.next-shape :refer :all]
[midje.sweet :refer :all])
(:import [clecs_tetris.world.component NextShapeComponent]))
[midje.sweet :refer :all]))


(fact "-add-shape creates transaction that adds a new NextShapeComponent."
Expand Down
15 changes: 7 additions & 8 deletions clecs-tetris/test/clecs_tetris/world/system/rendering_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@
->LinesDroppedComponent
->NextShapeComponent
->ScoreComponent
->GlassTileComponent]]
->GlassTileComponent
LevelComponent
LinesDroppedComponent
NextShapeComponent
ScoreComponent
GlassTileComponent]]
[clecs-tetris.world.system.rendering :refer :all]
[midje.sweet :refer :all])
(:import [clecs_tetris.world.component
LevelComponent
LinesDroppedComponent
NextShapeComponent
ScoreComponent
GlassTileComponent]))
[midje.sweet :refer :all]))


(fact "-get-next-shape returns 4x4 tile grid of next shape."
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
(ns clecs-tetris.world.system.update-shape-test
(:require [clecs-tetris.world.component :refer [->CurrentShapeComponent
->GlassTileComponent
->TargetLocationComponent]]
->TargetLocationComponent
CurrentShapeComponent
GlassTileComponent
TargetLocationComponent]]
[clecs-tetris.world.system.update-shape :refer :all]
[clecs.mock :refer [mock-component
mock-query
mock-set-component
mock-world]]
[clecs.query :as query]
[midje.sweet :refer :all])
(:import (clecs_tetris.world.component CurrentShapeComponent
GlassTileComponent
TargetLocationComponent)))
[midje.sweet :refer :all]))


(fact "-set-glass-tile sets one tile."
Expand Down

0 comments on commit 22de34f

Please sign in to comment.