Skip to content

Add browser-playable prototype for Factory Launch#1

Merged
highvoltaage merged 5 commits intomainfrom
codex/set-up-game-state-and-mechanics
Oct 27, 2025
Merged

Add browser-playable prototype for Factory Launch#1
highvoltaage merged 5 commits intomainfrom
codex/set-up-game-state-and-mechanics

Conversation

@highvoltaage
Copy link
Copy Markdown
Owner

Summary

  • add a static web client with HTML, CSS, and modular JavaScript to play the Factory Launch prototype in a browser
  • implement front-end game systems for research, drills, smelters, inventory, and storage drawing on the existing simulation rules
  • refresh documentation with GitHub Pages hosting guidance and retain the Python simulation as a reference backend

Testing

  • pytest

https://chatgpt.com/codex/tasks/task_e_68ff98ba34c4832e85873e98d38d6ef0

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread js/gameState.js
Comment on lines +114 to +117
addFuelToMachine(machine, amount) {
if (this.takeFromPlayer("coal", amount) < amount) {
this.addLog("Not enough coal to fuel the machine.");
return false;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Avoid consuming coal when refuel request fails

addFuelToMachine removes coal from the player before verifying that the full amount is available. If the player clicks “Refuel with 10 Coal” while holding only 3, those 3 units are taken from inventory, the call returns false, and the machine receives nothing. This silently burns scarce resources. Consider checking availability (or rolling back the withdrawal) before mutating inventory so a failed refuel leaves the player’s coal untouched.

Useful? React with 👍 / 👎.

@highvoltaage highvoltaage merged commit 2cc1ba9 into main Oct 27, 2025
3 checks passed
@highvoltaage highvoltaage deleted the codex/set-up-game-state-and-mechanics branch October 27, 2025 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant