« first day (386 days earlier)      last day (3176 days later) » 

5:01 PM
@jacwah a mythos-specific feature. Cards don't only cost mana to play, they also cost mana to keep, by reducing your available mana at the start of your turn
@Phrancis about this: github.com/Cardshifter/HTML-Client/commit/… The file that is being included in the client is the card_template.html file, not the file you edited there.
technically, card_model.html can be thrown away completely, but I kept it there because I thought you used it to test with
 
@DanPantry The <card> tag that we're using right now, that's technically not valid HTML, is it?
@Phrancis noooooooooow we're talking! Niiiiiiice
I have good feelings about this HTML Client
 
@SimonAndréForsberg I know. I'm making the model using a spoof. Then I'll copy it to the other file but use the linked data
 
Nice nice, and nicer!
 
@Phrancis That looks amazing!
 
5:09 PM
Logging in Grails 3 is a pain :|
 
<3 Bootstrap
 
Those little icons and new colors really add a lot to the card.
 
Does the wrench vs. cog convey the right meaning?
 
nope. I have no clue what they are.
 
^^
 
5:10 PM
@SimonAndréForsberg Have you used logging in Grails or Spring previously?
 
wrench = scrap cost (to build) | cog = scrap value (e.g. parts)
 
After you explain it, it makes more sense.
 
@Phrancis then it maybe would have made sense, because I don't know of any Chinese Gods that have scrap or scrap cost
 
[Cardshifter/HTML-Client] Phrancis pushed commit b3d4e5b2 to sections-layout: Add buttons and icons to card spoof
 
@SimonAndréForsberg Oh, right. I plan to use ng-show so it only shows when applicable
idem. for the lightning (effect) and info (flavor) buttons
 
5:13 PM
alright
@skiwi I think @Duga uses some
 
@SimonAndréForsberg I've googled it for quite a while, but I can nowhere find where the actual logging call is beign done, just documentation on configuration
 
Hmm. The server is not sending a EntityRemovedMessage when I defeat the enemy player.
 
> I think this could be achieved fairly simply on the web client. Let's leave this open for libGDX, but I'll create a separate issue on doing this with CSS/AngularJS for web client.
 
@SirPython enemy player entity is not removed technically. it shouldn't send that
 
Oh? Then what should it send?
 
5:16 PM
PlayerEliminatedMessage
 
I don't see that in the API outgoing messages.
 
@skiwi github.com/Zomis/Duga search for Log4j, Logger, or whatever you'd like
@SirPython pulled recently?
 
I'm looking here.
 
@SirPython I'm looking here
i.e. wrong branch
 
Ah, develop is the last snapshot?
 
5:18 PM
almost
haven't made a snapshot for this yet, but I think it is time to make one
 
> Related to [Associate mods with moods](https://github.com/Cardshifter/Cardshifter/issues/349), we should program an Angular way to dynamically change which CSS to use depending on which mod is selected.

These sections would be affected:
- [ ] Card model
- [ ] Deck builder
- [ ] Game board
- [ ] Bootstrap popovers, modals, etc. ([info](https://angular-ui.github.io/bootstrap/))

I think from that we should exclude the login and lobby. We can reuse some of the same CSS we use for the mai
 
That didn't take long!
 
> I'll make sure the appropriate CSS classes are added, someone else make the actual CSS implementation :)
 
@Phrancis have been considering making such an issue myself
 
5:22 PM
@SirPython ^^
 
I thought the new snapshot just came out yesterday.
 
always room for another snapshot
this one includes the PlayerEliminatedMessage, which did not exist yesterday
 
> You know I <3 CSS, don't worry I got you covered :+1:
 
> Perhaps the CSS files paths should be sent over with the mod info. Otherwise, the CSS files would be "hardcoded" into the source, and wouldn't allow a user who is hosting their own server and their own mods to have a custom feel.
 
5:24 PM
^^ good thinking
 
I was thinking that the mod name could be used for that
 
We could always include a default CSS template, in case the mod name doesn't match a file
 
@Phrancis Put that in a comment.
 
@SimonAndréForsberg No. If you're that worired about it, you can use the replace option on a directive.
If you set that option to true, then the element in the template will replace the original directive.
 
@SimonAndréForsberg That's the one: github.com/Zomis/Duga/blob/…
A magical log.warn, no clue where it came from
 
5:30 PM
> We could always include a default CSS template, in case the mod name doesn't match a file. Perhaps have a directory for this like:

modcss ->
cyborg-chronicles.css
default.css
mythos.css
 
s/modcss/modstyles/
 
@DanPantry I more meant that log is nowhere defind at all in that class
 
@skiwi oh
 
@skiwi Grails magic
 
5:32 PM
@SimonAndréForsberg Magic
 
Ah, the rounded edges and the background color makes it look beautiful!
 
It does, right! Brings it all to life
 
[Cardshifter/HTML-Client] Phrancis pushed commit dec1c8c1 to sections-layout: Add rounded borders and background color to make it look more like an actual card.
displays win or lose message

Now, when a player is eliminated, the current user is shown a message either telling them that they won or that they lost. Either way, after that, the player is navigated back to the lobby.

Right now, the message is displayed in the form of an alert (AH!). Later, this will be replaced with ui-bootstrap magic.
 
5:44 PM
^^ NICE
window.alert("Use Bootstrap dummy!");
 
window.alert("That's your job, CSS guy");
 
Should be easy enough to change with modals
 
> this needs to change something on $scope that can be reflected in the view, right?
 
The web client is coming along Fantastically! Special thanks to @SimonForsberg and others!
 
@SimonAndréForsberg I actually did make a full server 2 years or 3 years ago, it's not on Github, but the project is called TradingCardGameServer ;)
 
5:47 PM
@StackExchange I'd like to specially thank @SirPython, @jacwah, and @DanPantry who are helping out greatly! (did I miss anyone?)
 
@StackExchange Took long enough ;p
 
@SimonAndréForsberg no problem :-) I'm always glad to help CR
and citizens of CR
 
@SimonAndréForsberg Sure but I don't know their Twitter handles :)
 
@skiwi did it work? Was it playable?
 
Aug 9 at 16:33, by SirPython
This project is so fun, too.
 
5:49 PM
@SimonAndréForsberg There was no game as far as I remember, but there was a working chat client where you would need to login aswell :P
 
@Phrancis @lambdaexprdotio, email is dan@lambdaexpression.io
 
The game would be the next step
 
@skiwi lol, then "TradingCardGameServer" was an excellent name for it.
@skiwi and the next step never came?
 
@SimonAndréForsberg Nope
 
@DanPantry Cool. I need to keep this stuff somewhere... makes spreadsheet
 
5:52 PM
@SirPython
@SirPython Test
 
Lol, I wrote my semi-ORM there
 
I've learned about git add -e, git add -N and git add -p recently... makes me realize the power of git
 
@SirPython Test 2
 
Reblogged stuff from your twitter on the wrong twitter account
dammit
 
@DanPantry What does that do?
@DanPantry s/blogged/tweeted/
 
5:55 PM
@SimonAndréForsberg Tumblr has left its mark....
 
@SirPython Test 3
 
@SimonAndréForsberg git add -N file marks the intention to add files but doesn't actually add them. basically it tracks untracked files
git add -p gives you an interact interface to add segments of files that are tracked and have changes in the working directory
so you can add part of a file
 
git add -p is really great
 
How cute... this old code: pastebin.com/CsznYMu8
@DanPantry Ah damn, I really need that one!
 
git add -e basically shows you the entire diff that would be committed if you added everything and lets you modify it
 
5:57 PM
[Cardshifter/HTML-Client] Zomis pushed commit 458458e6 to game-board: Bye bye, <li>. Hello ng-class and stuff inside the card-template
 
git add -e is a bit tricky because you have to make sure if you remove a - or + that the white space stays the same otherwise your patch won't apply
 
@Duga Parts of that commit doesn't feel very optimal, but it works. Could use a review.
 
@SimonAndréForsberg definitely could do a review but its better than the monolithic html before
 
@DanPantry Ah, I use SourceTree for that already. Good to know that there's an easy command-line way as well.
 
@SimonAndréForsberg I work with git purely from the command line
 
5:59 PM
I use command line for most things. Only use SourceTree to make the commits
@skiwi could be a lot worse
 
@SimonAndréForsberg Looks like with that Java Websocket librarty you cannot store data related to a connection?
(Of course I can keep track of a mapping myself)
 
there you solved it yourself ^^
 
Seems more efficient if it would be able to keep track of this by itself
 
I disagree.
many servers don't need that, then it would just be a useless feature.
it's better to keep the library simple
and let the users of the library do the complicated things
 
I disagree :P
 
6:03 PM
just because you're lazy
 
It's a good thing to be lazy, it gives more efficient solutions :)
 
@skiwi ... or no solutions at all
 
I don't get this
def methodArguments = [connection, user] + arguments.toArray()
def methodArguments = [connection] + arguments.toArray()
First one works, second one doesn't
On second one IntelliJ says + cannot be applied on (Object[])
 
have you tried actually running both?
 
6:14 PM
Not yet, I thought I could trust my IDE
 
It's quite annoying if it gives warnings and yellow highlights everywhere
 
Condensed the design a little bit so cards could be made smaller
 
[Cardshifter/HTML-Client] Zomis pushed commit e634f896 to game-board: added game CSS class corresponding to what mod is being played, addressing #67
> Example:

.game-mythos .card {
background-color: #cfa97f;
}

.game-cyborg-chronicles .card {
background-color: #7f007f;
}
[Cardshifter/HTML-Client] Phrancis pushed commit c4cb4dd9 to sections-layout: Styling improvements
 
@skiwi Don't trust your IDE. Not when it comes to groovy. There are so many things Groovy can do at runtime that the IDE can't possibly foresee at compile time.
@Phrancis what is the icon in the bottom-right?
 
6:18 PM
@SimonAndréForsberg Damn, I like IDE support
 
@SimonAndréForsberg Book. The (i) icon was glitchy looking. It will open the Flavor field
 
@Phrancis Can you add some example icons/buttons/something for performing actions such as Scrap and Attack? Right now those are added below the card, which I feel is not optimal.
 
Hmmmmm Should those really be "on" the card?
 
well... the actions need to be able to be performed somehow... what do you suggest?
 
I don't think it's optimal from a player/display standpoint... we'd have to either leave some empty space on all cards for those, or make the card size flexible, which I think would be really clunky
 
6:21 PM
@SimonAndréForsberg We can use CSS's z-index to place a button smack in the middle of the card.
 
Well, there could be a div "attached" to the card (bottom or top for example) with the actions
Let me make a spoof
 
Ergh. I tried to push changes to the client before I pulled the most recent commits and now my IDE hates me.
 
@SirPython git pull --rebase ?
 
It won't let me rebase.
It won't let me merge.
 
that's mean
What's the git status ?
 
6:24 PM
A bunch of gibberish. It's fine, it was a small improvement that I'll just add back in after I completely revert.
 
@SimonAndréForsberg Do you have any IDE warnings still enabled when workign with Groovy and InelliJ?
 
@Simon @SirPython ^^ thoughts?
 
Could there possibly be more than two actions?
 
Sure, you can have 1000 actions if you make the div big enough ;D
But seriously, yes of course; perhaps we could just use a visual aid (icon or whatnot) instead of a full word
 
6:27 PM
> You might not want a creature card to look the same as a spell card, for example.

Some card names should maybe also have a specific template

And perhaps even more importantly: Different mods should have the possibility of using different templates.

Things that perhaps should be able to affect what template to use:

- mod name
- card name
- card type (Spell / Creature / Enchantment...)
- full creature type ("Greek God Hero")
- partial creature type? (for "Greek God Hero", try als
 
I'd like to make custom icons eventually also
 
@SirPython there's no theoretical restriction on the server-side on how many actions that may (in the future) be available on a card. There are some MTG cards, which I'd like to implement some day, that has about 4-5 actions available (maybe even more).
 
6:30 PM
Okay. I was just wondering because I want to make sure that the card action box won't freak out if three actions are available.
 
^^ If you use same icons and colors as on the card, it makes it visually simple to use
 
@SirPython well, there needs to be some CSS-width-specification on it so that it doesn't freak out, I guess
 
Could easily have the number with it too, e.g., Attack: 3, Scrap: 2
 
I don't think the numbers belong near the action buttons
 
OK.
If it did overflow, I have a set width, so they would go underneath
 
6:32 PM
How do I run the Groovy mod tests?
 
But this could easily fit 3, or even 4 actions if I used btn-sm
 
@jacwah gradlew test, they are run as part of cardshifter-core
if you use an IDE, you can have it run the GroovyTest JUnit class
 
Why didn't I think of that? Thanks!
 
@SirPython ^^ Using btn-sm fits 4 actions
 
6:36 PM
Is that ng-fittext magic?
 
Nope, plain Bootstrap magic
<!-- card actions spoof -->
<div style="clear:both; width: 180px; padding: 3px; border-style: solid; border-width: 2px; border-radius: 10px; text-align: center;">
    <button class="btn btn-sm btn-danger glyphicon glyphicon-screenshot"></button>
    <button class="btn btn-sm btn-primary glyphicon glyphicon-cog"></button>
    <button class="btn btn-sm btn-warning glyphicon glyphicon-flash"></button>
    <button class="btn btn-sm btn-success glyphicon glyphicon-heart"></button>
</div>
 
My goodness... I finally revert, redo my changes, and realize that they are in the wrong branch.
 
^^"
 
as long as you're using glyph-icons then...
 
git stash
 
6:38 PM
Now there are all these merge conflicts everywhere and my IDE has screwed up the indentation in every file.
 
git stash indeed
 
I did use that.
 
or just git checkout otherbranch
 
I did both of those.
 
6:38 PM
I don't think you can switch branches with a dirty working directory
 
And now the problem is here.
 
Testing started at 8:37 PM ...
8:37:29 PM: Executing external tasks 'cleanTest test --tests com.cardshifter.core.GroovyTest'...
Is it just slow?
 
@jacwah yes you can
 
Spring Bean injection outside grails-app is not fun
 
unless you've modified some files that will be overwritten by the checkout of the other branch
@skiwi Dependency Injection is always fun.
 
6:41 PM
[Cardshifter/HTML-Client] Phrancis pushed commit 7142886e to sections-layout: Added card actions spoof to card_model.html
 
@jacwah might be... try running gradlew test --info if nothing happens
 
@SimonAndréForsberg You're right
 
added ping

Now, when an invite is received, a ping is played for the person who is receiving the invite.
 
@jacwah I tend to be on the wrong branch quite a lot ;)
 
6:44 PM
@Duga I completed this 25 minutes ago.
Only now did my IDE decide to not hate me.
 
@SimonAndréForsberg My first 5 PRs or so I managed to commit them to my local develop/mods and had to rebase them to a new branch to open the PR
 
@SimonAndréForsberg Not when you can't get it to work
 
bah, I tried to fix issue 53 but it seems like I'm failing completely
 
@SimonAndréForsberg Would you like help? Or, do you have it under control?
 
[Cardshifter/HTML-Client] Zomis pushed commit 187c2ce2 to modding: HTML ids should be unique, using it as a class instead
 
6:53 PM
@SirPython I have nothing under control
I'm gonna find something else to work on
 
Alright. I'll take over that, then.
 
Alright, I'm ready to plug all this in the actual card model
 
def propertyMissing(String name) {
    if (name == 'failure') {
        return false
    }
    if (name == 'ok') {
        return true
    }
What's the reason for doing this instead of defining failure and ok?
 
@jacwah not completely sure.
@Phrancis please do so
 
6:59 PM
added clickable radio buttons for mods

At the bottom of the screen is the mod selection and on the side of the screen is the player list. Originally, in order to select one of the elements in either of these lists, you'd have to click that tiny radio button. However, now you can just click the label associated with it to select it.
 
@Duga was it that easy?
 
I guess so.
 
> Is this issue cleared out now? Time to close it?
 
@Duga @SimonAndréForsberg Yup!
 
7:02 PM
@SirPython you go ahead
 
@Duga No pressure, but that's the last step for the first milestone. (that is one week late)
 
All that is needed is for @Phrancis to do some ui-bootstrap magic for the end game pop-up.
 
I could do that part if I only knew what the ui-bootstrap-magic was
 
Here, Phrancis put up an example yesterday. I'll find it for you.
 
7:04 PM
there's some slight JS stuff that's required too, right? Like using $scope and add the message in there somewhere
 
Yes, there are a few things.
 
 
16 hours ago, by Phrancis
https://angular-ui.github.io/bootstrap/ - Scroll about 50% down
To "Modal"
Seems rather simple.
Some like $modal.open(<template stuff>);
 
[Cardshifter/HTML-Client] Phrancis pushed commit b5d3aea2 to sections-layout: Added card model layout to card_template.html
 
@SimonAndréForsberg ^^
 
7:09 PM
@SirPython Simple enough for you to do it? :)
 
I notice there is no controller for the card_template, I'm not sure how to do all that, can one of you assist?
 
@SimonAndréForsberg Sorry, that was a poor choice or words with little explanation.
 
@Phrancis I'm not sure there needs to be one, but maybe having one would help cleaning up the existing one that has grown quite big.
@SirPython alright, I'll try. I need to learn more about this part of Angular anyways
 
All the controllers need to be refactored into smaller controllers.
 
7:11 PM
Well, I mean there has to be a way to tie in card_model.css and the rest of the dependencies for other pages no?
 
For example, the lobby controller needs to be split up into: chat controller, invite controller, etc.
 
@Phrancis well, I think that is just about including the CSS file somewhere. I don't think you need a controller for that
 
@Phrancis Probably in the directive.
 
I don't have a <head> in there so I can't really <link> a stylesheet in the body can I?
 
7:12 PM
No, don't do that. Hold on, I'm seeing if there is a way to inject css in a directive.
 
Okay
I'm careful naming CSS classes, so if it just had a <link> in whatever part of this structure that includes the head would probably work just fine too
Taking a short break :)
 
@Phrancis Is there a specific class that you would like to add to the card?
 
I use 3 classes for the card. Might be more in the future
They are in card_model.css
 
Error: [$injector:unpr] Unknown provider: $modalProvider <- $modal
@DanPantry / @SirPython Help? ^^
 
Try this:
1. Open up cardshifter.js
Nevermind.
 
7:23 PM
lol
 
It's probably because you don't have the ui-bootstrap injected.
Hmm. That's odd; I thought Phrancis added it yesterday.
Do this:
Here, I can help you in a minute.
(Sorry, I'm trying to do too many things at once)
Okay. Now I can help.
 
Ah, guess what branch I haven't merged with?
 
sections layout?
 
yup
I'll get back to you
 
Alright.
 
7:28 PM
The coupling in this server is too damn high
 
We're so close to having a playable web client, I can smell it!
 
make it work first, @skiwi.
Who cares about coupling?
 
@SimonAndréForsberg I can't care to care about that right now
 
Trying to figure out using metaClass how to only loop through methods that I have defined myself on that class
@SimonAndréForsberg I'm more concerned about getting it to work first
 
7:30 PM
good, my point exactly.
@skiwi My suggestion: Don't. Change approach. Or use actual Java reflection (remember that groovy compiles to Java, right?). Personally, I would store the method names in a list.
 
now grabs card model style

Now, the module for the game board `require`s the CSS file that goes along with the card model template, so the card model template can look pretty.
 
@Phrancis ^^
 
@SimonAndréForsberg Does Java reflection work properly on Groovy classes?
 
I think so, yes @skiwi
 
What's up with this btw?
println userHandler.metaClass.methods.each { it.declaringClass }
It still prints the method instances
 
7:36 PM
GET http://localhost:8080/images/cards/mythos/default.png 404 (Not Found) @Phrancis we need images ;)
 
^^
You can comment that out for now.
 
@SimonAndréForsberg Is this resolved?
 
Oh right. That.
@DanPantry I do not think so.
 
OK. That error occurs when ui-bootstrap isn't included in the module.
angular.module('myModule', ['ui.bootstrap']).
 
Yes. Doesn't the package have to be added to package.json and to the cardshifter.json?
 
7:40 PM
npm install angular-bootstrap --save
go to the module that requires angular bootstrap
at the top of the file, require('angular-bootstrap');
then add 'ui.bootstrap' to the module dependencies
 
@DanPantry @SirPython yes it is resolved
 
var angular = require('angular')
var ngRoute = require('angular-route');
var lobby = require('./lobby/module');
var login = require('./login/module');
var deckBuilder = require('./deck_builder/module');
var topNavbar = require('./top_navbar/module');
var gameBoard = require("./game_board/module");

angular.module("CardshifterApp", [
    ngRoute,
    topNavbar.name,
    deckBuilder.name,
    lobby.name,
    login.name,
    gameBoard.name
Wouldn't you store the require in a variable and add it to that array?
 
Not necessarily because angular-bootstrap might not export a value
(i.e, it might not be configured to use commonjs)
alas, thats the probelm with using angular with commonjs
 
Oh wow. It even says how to inject it on the project page.
require( 'angular-bootstrap-npm' );

angular.module( 'app', [ 'ui.bootstrap' ]);

//you can also use the module as the module name, e.g.

angular.module( 'app', [ require( 'angular-bootstrap-npm' )])
 
I've never used angular-bootstrap-npm
the official source is $ npm install angular-ui-bootstrap
 
7:44 PM
In Mythos you get 10 mana on turn start, right?
How can I trigger a new turn to start in a test?
from clearState test('mana upkeep') using {
    def card = to you zone 'Hand' create {
        creature 'Chinese'
        health 1
        manaCost 3
    }
    def player = you
    assert player.mana == 10
    uses 'Play' on card ok
    assert player.mana == 7
    uses 'End Turn' ok
    assert player.mana == 17
}
The last assert is failing because mana is still == 7
 
@SimonAndréForsberg LOL
 
@jacwah uses 'End Turn' ok (makes the player perform the end turn action)
 
@SimonAndréForsberg That's what I'm doing... Do you know why player.mana is not increased?
 
@jacwah mana is restored at the beginning of turn, when you do end turn once it will be the opponents turn
do uses 'End Turn' ok again
 
Oh I see
 
7:50 PM
@SimonAndréForsberg Maybe I'm wrong, but I can't believe that it's impossible in Groovy to figure out what methods are declared in a given class
 
Is there any documentation on mod testing?
 
[Cardshifter/HTML-Client] Phrancis pushed commit 3c99de35 to sections-layout: Added directories for images, and default.png image for each mod.
 
@SimonAndréForsberg ^^
 
@skiwi it probably isn't
@jacwah erhm... docu... docume... do-cu-ment-a-tion... that's a hard word for me.
7
 
Maybe I can mix Java and Groovy here
 
7:53 PM
@SimonAndréForsberg Maybe I'll try :)
 
Nice!
 
I'm making progress here, but I'm not yet showing what I wanted to show
 
[ping, $getStaticMetaClass, getMetaClass, setMetaClass, invokeMethod, getProperty, setProperty, $createCallSiteArray_1, $createCallSiteArray, $getCallSiteArray]
:|
I only defined ping
all that other stuff is Groovy stuff
 
7:56 PM
@Duga @SimonAndréForsberg Do you think a manaUpkeep property is a good solution?
If it's not specified manaCost is used.
 

« first day (386 days earlier)      last day (3176 days later) »