Skip to content

Java project for making a virtual battle royale game between celebrities in Twitter

License

Notifications You must be signed in to change notification settings

saespmar/warbot-twitter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Warbot for Twitter

Version Build Status codecov GitHub GitHub issues GitHub stars

Create a Twitter warbot that automatically tweets the state of a battle royale game. It randomly selects 2 participants from a list to fight each other: one wins, the other one dies. The last contender standing is the winner. The updates are periodically published on Twitter (including an image) until the game finishes.

Getting Started

Prerequisites

A Twitter developer account is needed to use this bot. Once the account is created, you'll see 4 codes in the 'Keys and tokens' section of your app. Place these codes in a file to allow the Java application the access of your account. You can find an example here. This file can be placed wherever you want as long as it's referenced in the Authentication class constructor. The default path of this file is config/tokens.env.

Next, select a directory where all the content of the battle royale game will be stored. In the example from this repository, everything is inside the example_battlefield folder. The folder must contain a list of participants, one per line, as you can see here. If a line starts with #, this person is no longer in the game, since other player has killed it.

Running

Create a main class similar to the provided in the demo. It's highly recommended to schedule the tweets using a tool such as ScheduledExecutorService.

If everything went OK, the tweets should look like this:

screenshot

License

This project is licensed under the MIT License - see the LICENSE file for details

About

Java project for making a virtual battle royale game between celebrities in Twitter

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages