Skip to content

Conversation

@ghost
Copy link

@ghost ghost commented Jul 17, 2018

This is the WIP concept for a new style.

@samuelgoto
Copy link
Collaborator

Is there a deployment of this that I could be looking at?

Copy link
Collaborator

@samuelgoto samuelgoto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bit hard to read with inconsistent formatting between the files. Can yon run a linter here in all files to make sure all files have a consistent style guide?

I'm mostly interested in unblocking the submission of this CL as quickly as possible, but hoping to get at least some of the low hanging fruits regarding code quality.

if (largest_value == utillity(RESULT(state, action_list[action]))) {
return action_list[action];
function alphabeta() {
let cur = abstates
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

; at end of lines here and elsewhere

function alphabeta() {
let cur = abstates
let scale = 600
let div = document.getElementById("alphabetaCanvas")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix indentation, here and elsewhere

return utillity(state);
var largest_value = 0;
var action_list = actions(state);
for (var action = 0; action < action_list.length; action++) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JS has this neat iterator, like for (let action of action_lists) which works really nice. worth using it.

function reset(tree, depth, opacity) {
tree.graphic.group.setAttribute('opacity', opacity)
tree.graphic.message.setAttribute('class', 'board_status')
if (depth == 0)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'd wrap everything around {}s. here and elsewhere

return 1
}

GetBoardOpacity(id, tile) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a little awkward that there is no consistency between method name patterns here ... maybe just use camelCaseEverywhere?

@samuelgoto samuelgoto merged commit f95e88b into aimacode:master Jul 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants