/* * Copyright(c) 2017 Daneil Knuettel */ /* This program is free software. * Anyways if you think this program is worth it * and we meet shout a drink for me. */ /* This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . * * Dieses Programm ist Freie Software: Sie können es unter den Bedingungen * der GNU Affero General Public License, wie von der Free Software Foundation, * Version 3 der Lizenz oder (nach Ihrer Wahl) jeder neueren * veröffentlichten Version, weiterverbreiten und/oder modifizieren. * * Dieses Programm wird in der Hoffnung, dass es nützlich sein wird, aber * OHNE JEDE GEWÄHRLEISTUNG, bereitgestellt; sogar ohne die implizite * Gewährleistung der MARKTFÄHIGKEIT oder EIGNUNG FÜR EINEN BESTIMMTEN ZWECK. * Siehe die GNU Affero General Public License für weitere Details. * * Sie sollten eine Kopie der GNU Affero General Public License zusammen mit diesem * Programm erhalten haben. Wenn nicht, siehe . */ #ifndef __playfield_h_ #define __playfield_h_ /* This files contains all functions to control the playfield and horizon. The following functions are defined in this file: :: void build_horizon(char *** horizon); Allocates the horizon according to ``conf.h``. In addition to this it prints enough newlines to make space in the terminal for the playfield. :: void horizon_drop_one_line(char ** horizon); Moves all objects from one line to the next line of the horizon. The first line of the horizon is filled with blanks. :: void print_horizon(char ** horizon); Prints the entired horizon usinf ``put_line``. :: void delete_horizon(char ** horizon); Frees the horizon. :: char * allocate_playfield(size_t width); Allocates a playfield with the given width (The parameter should be set according to ``conf.h``). Fills the string with blanks. */ void build_horizon(char *** horizon); void horizon_drop_one_line(char ** horizon); void print_horizon(char ** horizon); void delete_horizon(char ** horizon); char * allocate_playfield(size_t width); #endif