Cursgame Manual 0.2.0: Top

# Cursgame Manual 0.2.0

## Table of Contents

- 1 Getting started
  - 1.1 Starting a game
    - 1.1.1 Importing
    - 1.1.2 Preparing
      - 1.1.2.1 Map
      - 1.1.2.2 InputHandlers
    - 1.1.3 Instanciation
    - 1.1.4 Starting the game
    - 1.1.5 The whole thing
  - 1.2 Filling the game
    - 1.2.1 A player
    - 1.2.2 Control
    - 1.2.3 Objs
      - 1.2.3.1 Placing the wall
      - 1.2.3.2 Color
  - 1.3 AIs
    - 1.3.1 The action-loop
      - 1.3.1.1 action-loop example
- 2 Module game
  - 2.1 The Game class
    - 2.1.1 methods
      - 2.1.1.1 __init__/constructor
      - 2.1.1.2 logwrite
      - 2.1.1.3 refresh
      - 2.1.1.4 loop
      - 2.1.1.5 subloop
      - 2.1.1.6 user_setup
      - 2.1.1.7 run
      - 2.1.1.8 start
      - 2.1.1.9 set_end/ending the game
    - 2.1.2 attributes
      - 2.1.2.1 map
      - 2.1.2.2 inp
      - 2.1.2.3 end
  - 2.2 padwrap
- 3 Module map
  - 3.1 The Map class
    - 3.1.1 methods
      - 3.1.1.1 __init__/constructor
      - 3.1.1.2 print
      - 3.1.1.3 place
      - 3.1.1.4 distance
      - 3.1.1.5 remove
      - 3.1.1.6 do_aloop
    - 3.1.2 attributes
      - 3.1.2.1 x/y
      - 3.1.2.2 screen
      - 3.1.2.3 lookon
      - 3.1.2.4 aloop
      - 3.1.2.5 game
- 4 Module inp
  - 4.1 nothing
  - 4.2 InputHandler
    - 4.2.1 methods
      - 4.2.1.1 __init__/constructor
      - 4.2.1.2 get_input
    - 4.2.2 attributes
      - 4.2.2.1 screen
      - 4.2.2.2 blocking
  - 4.3 PassiveInput
    - 4.3.1 methods
      - 4.3.1.1 get_input
      - 4.3.1.2 get_key
  - 4.4 key-constants
- 5 Module character
  - 5.1 Obj
    - 5.1.1 methods
      - 5.1.1.1 __init__/constructor
      - 5.1.1.2 move
      - 5.1.1.3 __str__
      - 5.1.1.4 color
      - 5.1.1.5 activate
      - 5.1.1.6 aloop
    - 5.1.2 attributes
      - 5.1.2.1 pos
      - 5.1.2.2 map
      - 5.1.2.3 dead
  - 5.2 Human
    - 5.2.1 methods
      - 5.2.1.1 __str__
      - 5.2.1.2 color
- 6 Module color
  - 6.1 color-codes
  - 6.2 Defining own colorcons
  - 6.3 Raw-colors
- 7 Module field
  - 7.1 Field class
    - 7.1.1 methods
      - 7.1.1.1 __init__/constructor
      - 7.1.1.2 uppest
      - 7.1.1.3 __str__
      - 7.1.1.4 color
      - 7.1.1.5 __repr__
    - 7.1.2 attributes
      - 7.1.2.1 x/y
      - 7.1.2.2 defstr
- Indices
  - Feature Index
  - Function Index
  - Variable Index
  - Class Index

Next: Getting started, Up: (dir) [Contents][Index]

# Cursgame

This manual describes how to use cursgame for writing text-base games. You don’t have to read the whole manual to use cursgame. Most of it is reference material.

This manual applies to cursgame 0.2.0
Cursgame is versioned following the guidelines of sermantic versioning as described on http://semver.org.

If you read this i assume you already installed cursgame and you can import it in python3. Please also note that cursgame is made for python3 and may not work in python2. I also assume that you are known to python3.

This manual begins with a tutorial to Cursgame, followed by chapters describing the details of the modues of Cursgame. A shorter reference can be obtained with pydoc or with the builtin help() command.

Next: Getting started, Up: (dir) [Contents][Index]