Tiny lil updates

This commit is contained in:
nelle 2023-11-04 02:26:44 -06:00
parent 71d312d9fb
commit 05c6afaf96
4 changed files with 5 additions and 7 deletions

View file

@ -4,8 +4,6 @@
### For now, please make issues on [The mirror repo](https://next.forgejo.org/Ouroboros/potrogue/issues) as ForgeFed has not yet been implemented in mainline ForgeJo, and this instance does not have an open registration
## Installation
#### Dependencies:
1. Make sure you have installed Java 20/21
2. Clone this repo and run `./gradlew clean build` || ~~Download the latest .jar in the Releases page [Self-Hosted ForgeJo](https://git.ouroboros.group/Ouroboros/potrogue/releases) | ~~[Mirror](https://next.forgejo.org/Ouroboros/potrogue/releases)~~~~
3. Navigate to the `build/libs` directory, and run the jar (make sure its executable!)

View file

@ -29,7 +29,7 @@ class Config {
FileInputStream(file).use {
prop.load(it)
prop.setProperty("windowWidth", "80")
prop.setProperty("windowHeight", "50")
prop.setProperty("windowHeight", "54")
prop.setProperty("dungeonLevels", "2")
prop.setProperty("sidebarWidth", "18")
prop.setProperty("logAreaHeight", "12")
@ -50,5 +50,6 @@ class Config {
val sidebarWidth: Int = (prop.getProperty("sidebarWidth")).toInt()
val logAreaHeight: Int = (prop.getProperty("logAreaHeight")).toInt()
val helpTipHeight: Int = (prop.getProperty("helpTipHeight")).toInt()
}

View file

@ -35,7 +35,7 @@ class PlayView (private val grid: TileGrid, private val game: Game = GameBuilder
//Create help tooltip
val helpTip = Components.panel()
.withPreferredSize(Config().windowWidth - Config().sidebarWidth, Config().helpTipHeight)
.withPosition(Config().sidebarWidth, 38 - Config().helpTipHeight)
.withPosition(Config().sidebarWidth, 42 - Config().helpTipHeight)
.withDecorations(box(title = "Help"))
.build()

View file

@ -5,17 +5,16 @@ import group.ouroboros.potrogue.extensions.GameEntity
/*
* The TL;DR for DIP is this: By stating what we need (the World here) but not how we get it we let the outside world decide how to provide it for us.
* This is also called Wishful Thinking.
* This is also called Wishful Thinking.
* This kind of dependency inversion lets the users of our program inject any kind of object that corresponds to the World contract.
* For example, we can create an in-memory world, one which is stored in a database or one which is generated on the fly. Game wont care!
* This is in stark contrast to what we had before: an explicit instantiation of World by using the WorldBuilder.
* This is in stark contrast to what we had before: an explicit instantiation of the World by using the WorldBuilder.
*/
class Game (
val world: World,
val player: GameEntity<Player>
) {
companion object {
fun create(