@Vogel612 it's only a notification that the daily statistics are reset for the repos. Later though I will make sure so that if @Duga is unable to post in chat for any reason, the daily stats won't be reset. (it has happened a couple of times that stats are reset without any chat messages posted)
@bazola that explains it. A HashMap does not keep any order of elements. If you want to retain order, use LinkedHashMap, but I don't know if that's fully supported in GWT.
<b>Deathrattle:</b> Replace your hero with Hand of the Attack of your weapon. | 2 | 4/1 | Master Hand Reckeinper | None | Neutral | Legendary | Minion | Goblins vs Gnomes
@maaartinus so far, 3+ player games are not really supported. Neither Battleship or UTTT is a 3+ player game AFAIK. I will likely support other 3+ player games though. Inviting and accepting will be done as it is done currently, but I will probably extend the invite functionality with a "invite start" message which will start the game if possible with the current players that has accepted.
@maaartinus FYI, in case you want them, the net.zomis dependencies you need is here: github.com/Zomis/UltimateTTTgithub.com/Zomis/Commons . I have to say though that they're a bit of old and unoptimized code, so there are not easy to get up and running :/ The UltimateTTT doesn't even contain a pom.xml apparently.
@Simon work on the multiplayer server for UTTT and Battleship, and have a bot fight with maaartinus. And get rid of that reload spam when things are saved
USER xxx username password WELC username STUS username online USER offline USER offline STUS username2 online INVT 0 UTTT username2 INVR 0 1 NEWG 0 1 PLAY 00
and I'm offline. But with telnet I get the information only from another client, the failed client gets simply ignored. I guess, you closed the stream, but my stupid telnet client tells me nothing.
@maaartinus the reason why you got offline recently is either because I shut down the server, or because of a timeout that I noticed in the log. I think you had a socket just lingering around without doing anything, those are bound to timeout sooner or later
@SimonAndréForsberg Not bad, but that implies a bit that we're like one of those rooms that "nurture" a language on the network? (e.g., VBA room, JS room etc.)
(which would also be fine by me, except we would probably need to change the face of the chatroom a bit, and move all those links in the description to perhaps the project wiki)
i think of it as the game design chat room of code review, but I'm not quite sure of what another good name would be, and its a good thing for cardshifter to have a home
You could be writing code for a videogame right now, you know, instead of feeding data to that thing :)
I also know a website where you can download full classic books in plain text, maybe that would yield interesting results to feed Moby Dick and such to that RNN. And while it's learning, write code!
Random random = new Random(qaList.size());
for(int index = 0; index < qaList.size(); index += 1) {
Collections.swap(qaList, index, index + random.nextInt(qaList.size() - index));
}
@Phrancis And Set the more I think about your problem the more I think Set will not be your Solution. Something like a Map<String, List<String>> could be used. But read the documentation about all the Collections! You'll figured it out!
@SimonAndréForsberg I might try implementing very rudimentary versions of each just so I can cement in my mind how they work, I think this might make things "click" and usually once it does, I can run with it pretty easily from there
Your threading seems to have problems. I've received (after split) [maaartinus-1, onlineSTUS, maaartinus-1, online] I'm sure I sent something wrong, but you glued two lines together.
@maaartinus gluing two lines together can happen when it comes to using sockets in programming. I've had it happen many times before. How about I send a null character after each message? Or a line feed character? That should give you something to split on.
But you are already sending a newline after "STUS maaartinus-1 online". The problem is that while you're sending two such lines (probably my fault), there's no sychronization ensuring that the chars don't get intermixed. Probably somewhere in https://github.com/Zomis/Server/blob/master/src/main/java/net/zomis/server/clients/ClientSocketHandler.java#L45
It looks like multiple threads writing into a single stream.
@maaartinus it's not a threading issue, it's a caching issue. the socket didn't have a chance to send the data before more data was coming, so it was packed together in the same package.
it's outside of my control, really.
it's very common that that happens with sockets.
all I can do is to either add information about how many bytes you should expect, or to add a specific "end of message" byte.
@SimonAndréForsberg This doesn't sound right. I'm reading it linewise and BufferedReader#readLine reads till the next newline (or EOF). You send the newline, but it comes after some other text. My trivial code doesn't care about packages, that's somewhere deep below.
@SimonAndréForsberg There's such a byte already: The newline.
@maaartinus I'll take a look at that tomorrow. I'm exploring the moderator GUI world at the moment. If you want to, feel free to make an issue about it on my github repo
> As there's no sychronization in the [sender code](https://github.com/Zomis/Server/blob/master/src/main/java/net/zomis/server/clients/ClientSocketHandler.java#L45), the output may get mixed up.
For example, the following line may be received on the client side:
STUS maaartinus-1 onlineSTUS maaartinus-1 online
This happens because of the first line in another thread executing before the second line in the first thread: